Comments (6)
Hi @jonjohnsonjr, thanks for offering to help with this!
The code changes to make are really in Syft. Essentially, Syft should make 2 changes:
- The metadata Syft emits about Go packages should include what experiments are enabled, so that this information isn't lost
- Syft should trim the stdlib / go version to a valid semver version (remove the space and everything after.)
The definition of the Go package metadata is here: https://github.com/anchore/syft/blob/6107e5e2ad6e60f3f74ff4d3b2ca2ccffbed26ed/syft/pkg/golang.go#L4 - this definition likely needs new fields to hold information about the experiments, and then they need to be populated.
The function that scans the go binary for build info and other information is here: https://github.com/anchore/syft/blob/3023a5a7bc870f70a3dd24213d795516288ca0df/syft/pkg/cataloger/golang/scan_binary.go#L22 - I'm not certain exactly the right factoring for where we should trim the version info and capture the metadata, but this function is in the neighborhood.
Happy to discuss further! Please let me know if you have any questions.
from grype.
Hi @jonjohnsonjr, thanks for the report! It looks like today we take that field as-is but we need to probably parse out the flags after the X:. We might need to find a place to record those flags somewhere. We'll put this in the backlog for a fix. Let us know if you're interested in working on it and we can help get you started.
from grype.
Just adding an explicit note that this causes false negatives, too. The Go stdlib usually accounts for a large surface area in vuln-matching a Go binary, so situations where Grype doesn't take the stdlib into account would mean missing any number of vulns if Go experiments are used. Also IIUC there are worlds where using Go experiments is much more common, such as to support FIPS.
from grype.
Let us know if you're interested in working on it and we can help get you started.
I can take a stab at it if you can point me in the approximate direction 🙏
from grype.
Related Issues (20)
- Java 5/6 CVEs are reported against Java 11/17 images HOT 3
- Add "none" as possible value for --fail-on option HOT 1
- Read Syft configuration from Grype HOT 4
- Incorrect instructions in DEVELOPING.md to build Grype from source HOT 4
- False negatives: Apache Tomcat vulnerabilities (e.g., CVE-2024-23673) not detected HOT 7
- PHP pecl redis mixes with redis project itself and creates false positive cve HOT 1
- False positive: CVE-2020-10663 (GHSA-jphg-qwrw-7w9g) json for Java is not affected, json for C is affected
- False Positive: CVE-2023-42282 not affected in SUSE ecosystem. HOT 2
- Distro tests fail within nixos HOT 11
- Add Can ecosystem and GITLAB Advisory database HOT 1
- Support for Azure Linux 3.0 HOT 4
- Add SARIF validation to test suite
- CVE-2024-3154 found with latest version HOT 2
- vex documents from the --vex flag do get processed or applied to the output correctly HOT 1
- False positives when installing both libcrypto, libssl 1.1 and 3 on alpine 3.19 HOT 3
- False Positive: GHSA-jvgm-pfqv-887x CVE-2016-7954 not affected in SUSE ecosystem
- False Positive: GHSA-g98m-96g9-wfjq CVE-2019-3881 ruby2.5-rubygem-bundler in SUSE ecosystem
- False positive: GHSA-jphg-qwrw-7w9g (CVE-2020-10663) in SLES 15.5
- False positives for github.com/hashicorp/consul: Installed version reported as v0.0.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grype.