-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add SBOM analyzer #4210
feat: add SBOM analyzer #4210
Conversation
Hi @knqyf263 , We fixed that in our pipelines internally and now the latest
Thanks! |
@agomezmoron Great! Thanks for updating! I'll be back to this PR next week and wrap it up. |
Hi, JFYI, the bitnami/vulndb repo was made public |
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
Trivy can take SBOM documents as input for scanning. | ||
See [here](../target/sbom.md) for more details. | ||
|
||
Also, Trivy searches for SBOM files in container images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be clarified that this currently only works for Bitnami images.
I came here from reading the release notes that just state:
9ef0113 feat: add SBOM analyzer (#4210)
This got me excited, because we could use this for our own images, but unfortunately this currently only works for this hardcoded directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think it works with the hardcoded directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to this discussion: https://github.com/aquasecurity/trivy/pull/4210/files#r1212955004
Even in current main
, the sbom.go
only checks the hardcoded path /opt/bitnami
for spdx-SBOMs:
// For Bitnami images
if strings.HasPrefix(input.FilePath, "opt/bitnami/") {
Or am I reading this wrong and other paths/formats are somehow implicitly supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is just rewriting file paths for Bitnami. SBOM itself is analyzed anyway.
Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com> Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
Description
Looks for SBOM files in container images, etc.
NOTE: CPE is not supported.
Example
Before
Details
After
Details
Missing JARs in SBOM
Following JAR files exist in
bitnami/elasticsearch
, but it is not included inopt/bitnami/elasticsearch/.spdx-elasticsearch.spdx
.Related issues
Checklist