Replies: 1 comment 5 replies
-
|
Hello @Bonifats Perhaps your |
Beta Was this translation helpful? Give feedback.
5 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi!
Thank you very much for your work on Trivy development.
After upgrading to version 0.64.1 from 0.63.0, I found that when creating SBOM from a file system with a relative path (not from the root, but for example from a custom folder test-root/), Trivy does not find OS packages. The reason is how the file path is now passed
filePath = path.Join(relativePath, filePath)heretrivy/pkg/fanal/artifact/local/fs.go
Line 276 in 86ee3c1
Because of this, the a.Required() condition does not work in the methods
a.analyzer.AnalyzeFileanda.analyzer.RequiredPostAnalyzers.As I understand it, the correct way would be to do it like this:
Desired Behavior
For methods
a.analyzer.AnalyzeFileanda.analyzer.RequiredPostAnalyzersfilePath must be likevar/lib/dpkg/availableActual Behavior
For methods
a.analyzer.AnalyzeFileanda.analyzer.RequiredPostAnalyzersfilePath will be liketest-root/var/lib/dpkg/availableReproduction Steps
1. Just copy files from ubuntu docker image to /Users/{{my_user}}/Downloads/test-root 2. Run trivy `trivy --format cyclonedx fs /Users/{{my_user}}/Downloads/test-root --pkg-types os -d`Target
Filesystem
Scanner
None
Output Format
CycloneDX
Mode
Standalone
Debug Output
Operating System
macOS 15.5 (24F74)
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions