feat: add golang patching#1388
feat: add golang patching#1388robert-cronin wants to merge 46 commits intoproject-copacetic:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1388 +/- ##
==========================================
- Coverage 37.70% 36.61% -1.10%
==========================================
Files 52 55 +3
Lines 7505 8587 +1082
==========================================
+ Hits 2830 3144 +314
- Misses 4447 5200 +753
- Partials 228 243 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Demo with |
ee37b7a to
507c2d2
Compare
Signed-off-by: robert-cronin <[email protected]>
- Introduced a new command `test-provenance` to test SLSA provenance fetching and parsing. - Implemented a `Fetcher` to retrieve SLSA provenance attestations from container registries. - Added a `Parser` to extract build information from SLSA provenance. - Created types for `Attestation`, `BuildInfo`, and `ProvenanceCompleteness` to structure the data. - Enhanced the main command to include the new `test-provenance` command. - Added comprehensive logging and error handling for better debugging and user feedback. Signed-off-by: robert-cronin <[email protected]>
…lity Signed-off-by: robert-cronin <[email protected]>
… binary detection Signed-off-by: robert-cronin <[email protected]>
… in Trivy parser Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
507c2d2 to
4291463
Compare
Signed-off-by: robert-cronin <[email protected]>
…ities Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
a8d2913 to
9c98635
Compare
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
3d90804 to
b8adfcb
Compare
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
|
@robert-cronin I tested this with the following but I am still seeing 86 vulns in the patched image, is there anything I'm missing?
|
Signed-off-by: robert-cronin <[email protected]>
i think this is also something we should probably surface more clearly in the copa output itself, maybe as part of #1451. if you want to test with an image that works, try |
pkg/provenance/detector.go
Outdated
|
|
||
| const ( | ||
| // golangToolingImage is the image used for running go version -m. | ||
| golangToolingImage = "golang:1.23-alpine" |
There was a problem hiding this comment.
don't use alpine
match to binary's go version
pkg/cmd/cmd.go
Outdated
| flags.StringVar(&ua.libraryPatchLevel, "library-patch-level", utils.PatchTypePatch, | ||
| "[EXPERIMENTAL] Library patch level preference: 'patch', 'minor', or 'major'. "+ | ||
| "Only applicable when 'library' is included in --pkg-types. Defaults to 'patch'") | ||
| flags.BoolVar(&ua.goStdlibUpgrade, "go-stdlib-upgrade", false, |
There was a problem hiding this comment.
lets make this more generic with toolchain-patch-level or similar
…ine tooling images Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
Signed-off-by: robert-cronin <[email protected]>
4b44935 to
f92e9a3
Compare
Closes #1386