-
Notifications
You must be signed in to change notification settings - Fork 671
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened:
grype v0.70.0 enabled go stdlib matching (#1550).
In grype v0.71.0 the go stdlib vulnerabilities no longer appear by default. Adding match.golang.using-cpes: true
seems to return this behavior.
What you expected to happen:
Expected the same behavior in grype v0.71.0 as was introduced in v0.70.0
How to reproduce it (as minimally and precisely as possible):
# initialize a go module using an old potentially vulnerable version
$ go1.19 mod init foo
$ cat > main.go <<EOF
package main
func main() {}
EOF
# build a binary to be scanned
$ go1.19 build .
# generate an sbom
$ syft packages --quiet --output=cyclonedx-json=sbom.json dir:.
# Vulnerabilities displayed with v0.70.0
$ go run github.com/anchore/grype/cmd/[email protected] --quiet sbom:sbom.json
NAME INSTALLED FIXED-IN TYPE VULNERABILITY SEVERITY
stdlib go1.19 go-module CVE-2023-39323 Critical
stdlib go1.19 go-module CVE-2023-29405 Critical
...
# No vulnerabilities found with v0.71.0
$ go run github.com/anchore/grype/cmd/[email protected] --quiet sbom:sbom.json
No vulnerabilities found
# re-enabling "match.golang.use-cpes" shows Go vulnerabilities again
$ cat > .grype.yml <<EOF
match:
golang:
using-cpes: true
EOF
$ go run github.com/anchore/grype/cmd/[email protected] --quiet sbom:sbom.json
NAME INSTALLED FIXED-IN TYPE VULNERABILITY SEVERITY
stdlib go1.19 go-module CVE-2023-39323 Critical
stdlib go1.19 go-module CVE-2023-29405 Critical
...
Anything else we need to know?:
Environment:
-
Output of
grype version
:$ grype version Application: grype Version: 0.71.0 BuildDate: 2023-10-12T13:27:46Z GitCommit: 3d582fd85145afe3fd3726437527a321efb664e9 GitDescription: v0.71.0 Platform: linux/amd64 GoVersion: go1.21.1 Compiler: gc Syft Version: v0.93.0 Supported DB Schema: 5
-
OS (e.g:
cat /etc/os-release
or similar):$ cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.3 LTS" ...
jiri-muller
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done