You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
When scanning an image that contains a Go binary with a dependency of a package that doesn't use go modules (appears as +incompatible in go.mod), the expected vulnerability wasn't not detected by Grype (github.com/dgrijalva/jwt-go in my case).
What you expected to happen:
The expected vulnerability is detected. e.g, for github.com/dgrijalva/jwt-go:
NAME INSTALLED FIXED-IN TYPE VULNERABILITY SEVERITY
github.com/dgrijalva/jwt-go v3.2.0 go-module GHSA-w73w-5m7g-f7qc High
How to reproduce it (as minimally and precisely as possible):
Create a minimal go program that uses only one dependency that has no go modules:
Run go mod init and go mod tidy and the following go.mod should be created:
module github.com/test
go 1.21.1
require github.com/dgrijalva/jwt-go v3.2.0+incompatible
Scan the directory with the Go program with Grype:
grype dir:./test
✔ Vulnerability DB [no update available]
✔ Indexed file system test
✔ Cataloged packages [1 packages]
✔ Scanned for vulnerabilities [0 vulnerability matches]
├── by severity: 0 critical, 0 high, 0 medium, 0 low, 0 negligible
└── by status: 0 fixed, 0 not-fixed, 0 ignored
[0000] WARN no explicit name and version provided for directory source, deriving artifact ID from the given path (which is not ideal)
No vulnerabilities found
Anything else we need to know?:
When I tried to create an SBOM using Syft first and to scan with Grype I got:
What happened:
When scanning an image that contains a Go binary with a dependency of a package that doesn't use go modules (appears as
+incompatible
in go.mod), the expected vulnerability wasn't not detected by Grype (github.com/dgrijalva/jwt-go
in my case).What you expected to happen:
The expected vulnerability is detected. e.g, for
github.com/dgrijalva/jwt-go
:How to reproduce it (as minimally and precisely as possible):
go mod init
andgo mod tidy
and the following go.mod should be created:Anything else we need to know?:
When I tried to create an SBOM using Syft first and to scan with Grype I got:
I modified the SBOM to remove the
incompetible
:Then, ran Grype and the expected vulnerability was found:
Environment:
grype version
:cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: