Replies: 2 comments
-
@DmitriyLewen Can you please take a look? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @oatovar Created #6709 for this task. Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
It's not guaranteed for a Go binary to have a main module populated when read by
buildinfo.Read
. Due to the implementation ofbuildinfo.Read
, a nil error is returned in such scenarios, and Trivy continues to add the empty main module as a package.Inspecting the resulting SBOM shows entries like the following:
Desired Behavior
The module should not be added if it's not available in the Go binary. This creates a separate issue, however. Trivy will have to handle the
stdlib
dependency differently since it won't have a root module to relate to. Skipping analysis would fix this, but it'll fail to detect versions of Go used by Go binaries which are used to find related vulnerabilities.Actual Behavior
A component with an empty name is reported when using
--format cyclonedx
.Reproduction Steps
Operating System
macOS 14.4.1
Version
Checklist
trivy image --reset
Beta Was this translation helpful? Give feedback.
All reactions