Prisma Cloud Application Security : Checkov donne des résultats vides lors de l'analyse d'Azure Repos avec .NET Framework 8.0 dans les fichiers csproj
263
Created On 08/16/24 16:00 PM - Last Modified 04/22/26 19:39 PM
Symptom
Disons que vous analysez un répertoire Azure et qu’il existe plusieurs fichiers csproj qui détaillent les informations sur le package du référentiel.
Si le framework cible dans ces fichiers est « net 6.0 », Checkov peut analyser correctement le dépôt et vous montrera les informations sur le paquet. Si le framework répertorié est « net 8.0 », Checkov produira des résultats vides.
Spécification du framework cible dans les fichiers .csproj :
Environment
- Nuage de prisme
- Microsoft Azure
- Tchekhov
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.
Utilisation de .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
Utilisation de .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
Pour l'instant, nous ne prenons en charge que .NET 7.0 ou une version antérieure. Une fois que le framework cible répond à cette exigence, Checkov pourra analyser les fichiers.
Nous travaillons actuellement à assurer la compatibilité avec une version .NET supérieure.