VEX related improvements for the build process #1767
macedogm
started this conversation in
Development
Replies: 1 comment
-
CC @itaysk and @afdesk apologies the direct ping, but just in case the repo isn't being watched closely as Trivy. |
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
-
In SUSE Rancher we have our own VEX Hub rancher/vexhub repository to remove (VEX) known false-positive CVEs in our projects (images and binaries) and derived third-party and upstream binaries.
Note: The VEX report follows the OpenVEX specification. The VEX Hub repository follows Aqua Security's VEX Repository specification.
In order for VEX to fully work and for security scanners (e.g., Trivy) to correctly match a VEX entry with a Go binary being scanned, the Go binary must have its full package path inside of it. Example:
When a Go binary is compiled by specifying directly the file as
go build main.go
as opposed togo build .
, the binary won't contain the package path.In the above case, the security scanner won't be able to match the binary with its respective VEX entry. This situation is happening with the binary artifacts generated in kube-bench due to:
kube-bench/.goreleaser.yml
Line 8 in df48da4
This doesn't happen with
make build
because it's pointing to the directory.
:kube-bench/makefile
Lines 41 to 45 in df48da4
I would like to propose a simple PR to fix this:
Would such change be accepted to help improve the build process and add the needed information for VEX removal by security scanners to actually work? The change doesn't affect the code's behavior and features.
Beta Was this translation helpful? Give feedback.
All reactions