Prisma Cloud Application Security: Checkov arroja resultados vacíos al escanear Azure Repos con .NET framework 8.0 en archivos csproj
257
Created On 08/16/24 16:00 PM - Last Modified 04/22/26 19:39 PM
Symptom
Digamos que está escaneando un directorio de Azure y hay varios archivos csproj que detallan información del paquete para el repositorio.
Si el framework de destino en estos archivos es "net 6.0", Checkov puede escanear el repositorio correctamente y le mostrará la información del paquete. Si el framework que aparece es "net 8.0", Checkov producirá resultados vacíos.
Especificación del marco de destino en archivos .csproj:
Environment
- Nube Prisma
- Microsoft Azure
- Chejov
Cause
In the .csproj files, the target framework specified is "net 8.0". In other file, it's "net 6.0".
When running a Checkov scan on both files, the file with framework "net 6.0" works fine. However, "net 8.0" produces empty scan results.
Usando .NET 8.0
checkov -d ./src --support --hard-fail-on HIGH --framework sca_package --bc-api-key **************::************** --prisma-api-url https://api.prismacloud.io --output spdx --output json --output-file-path "SCA/" --repo-id "****/****" --branch "****"
{
"passed": 0,
"failed": 0,
"skipped": 0,
"parsing_errors": 0,
"resource_count": 0,
"checkov_version": "3.2.219"
}
--- OUTPUT DELIMITER ---
## Document Information
SPDXVersion: SPDX-2.3
DataLicense: CC0-1.0
SPDXID: SPDXRef-DOCUMENT
DocumentName: checkov-sbom
DocumentNamespace: https://spdx.org/spdxdocs/checkov-sbom-3.2.219-454a024b-d83b-4152-bf58-8e26789deb93
## Creation Information
Creator: Tool: checkov
Creator: Organization: bridgecrew (meet@bridgecrew.io)
Created: 2024-08-09T16:47:05Z
Usando .NET 6.0
checkov -d ./src --support --hard-fail-on HIGH --framework sca_package --bc-api-key **************::************** --prisma-api-url https://api.prismacloud.io --output spdx --output json --output-file-path "SCA/" --repo-id "****/****" --branch "****"
## Package Information PackageName: ag.framework.validators SPDXID: SPDXRef-ag.framework.validators PackageVersion: 1.2.0 PackageFileName: /Ag.Pmkt.Api.Test/Ag.Pmkt.Test.csproj PackageDownloadLocation: NONE FilesAnalyzed: true ## Package Information PackageName: coverlet.collector SPDXID: SPDXRef-coverlet.collector PackageVersion: 3.1.2 PackageFileName: /Ag.Pmkt.Api.Test/Ag.Pmkt.Test.csproj PackageDownloadLocation: NONE FilesAnalyzed: true ## Package Information PackageName: fluentvalidation.validators.unittestextension SPDXID: SPDXRef-fluentvalidation.validators.unittestextension PackageVersion: 1.11.0.2 PackageFileName: /Ag.Pmkt.Api.Test/Ag.Pmkt.Test.csproj PackageDownloadLocation: NONE FilesAnalyzed: true ...
With .NET 6.0, you are able to see package information from the csproj files. You can't with .NET 8.0.
Resolution
Por ahora, solo admitimos .NET 7.0 o versiones anteriores. Una vez que el marco de destino cumpla con este requisito, Checkov podrá escanear los archivos.
Actualmente estamos trabajando para tener compatibilidad con una versión superior de .NET.