Replies: 2 comments 3 replies
-
|
Hello @mklenbw I couldn't reproduce your case: ➜ trivy -q image python:9476-test --pkg-types library --table-mode detailed
Python (python-pkg)
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
┌──────────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├──────────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ wheel (METADATA) │ CVE-2022-40898 │ HIGH │ fixed │ 0.38.0 │ 0.38.1 │ python-wheel: remote attackers can cause denial of service │
│ │ │ │ │ │ │ via attacker controlled input... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-40898 │
└──────────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘
➜ trivy -q image python:9476-test --pkg-types library -f cyclonedx -o report.cdx.json
➜ jq '.components[] | select(."bom-ref"=="pkg:pypi/[email protected]") | .properties' report.cdx.json
[
{
"name": "aquasecurity:trivy:FilePath",
"value": "usr/local/lib/python3.13/site-packages/wheel-0.38.0.dist-info/METADATA"
},
{
"name": "aquasecurity:trivy:LayerDiffID",
"value": "sha256:8142f41252ba2178e2ad5b5c2ca4d1b1217bcf0cc24cf9f3d64265dd60a1205d"
},
{
"name": "aquasecurity:trivy:PkgType",
"value": "python-pkg"
}
]
➜ trivy -q sbom report.cdx.json --table-mode detailed
Python (python-pkg)
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
┌──────────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├──────────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼────────────────────────────────────────────────────────────┤
│ wheel (METADATA) │ CVE-2022-40898 │ HIGH │ fixed │ 0.38.0 │ 0.38.1 │ python-wheel: remote attackers can cause denial of service │
│ │ │ │ │ │ │ via attacker controlled input... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-40898 │
└──────────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴────────────────────────────────────────────────────────────┘Can you share small test image with this problem? Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I tested it with a simple image and it seems to be limited to disputed CVEs. Is there a way to add these too? As of the PkgId i can confirm that libraries with missing PkgIDs are included in the vulnerabilities record. I picked some libraries with disputed CVEs. FROM python:3.12-slim-bookworm
RUN pip install "joblib==1.5.2" "urllib3==1.26.20" "PyJWT==2.10.1" "SQLAlchemy==2.0.43" |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When scanning an image with Python packages, some packages are not getting a PkgId set in the SBOM. That's not a problem by itself but the SBOM vulnerability scanner doesn't seem to respect those. None of the Packages without PkgId is getting CVEs attached.
Desired Behavior
All packages get an PkgId and get scanned by the SBOM vulnerability scanner.
Actual Behavior
Some packages are not getting a PkgId in the SBOM and are not scanned.
Reproduction Steps
1. Build an image with python components 2. Run the image scanner to create an SBOM 3. Use the SBOM scanner to scan for vulnerabilitiesTarget
Container Image
Scanner
Vulnerability
Output Format
JSON
Mode
Standalone
Debug Output
Operating System
Ubuntu
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions