-
Notifications
You must be signed in to change notification settings - Fork 186
[2/2] Circe-powered container scanning #1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The integration test failed with a rate limit error due to all my rebuilds, I'm going ahead and requesting review but rest assured that if there are more errors than that I'll fix them before merging 😄 ETA: Since resolved |
| Path Abs Dir -> | ||
| m (Maybe (Path Abs File)) | ||
| runWithCirceReexport img dir = do | ||
| let tarballPath = dir </> $(mkRelFile "image.tar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking my understanding - $(mkRelFile "image.tar") gets expanded at compile time so that tarballPath points to a non-optional, non-errorful path to ./$dir/image.tar at runtime, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it just converts from a FilePath to a Path Rel File. FilePath is an alias for String. Nothing fancy
FilePath: https://hackage.haskell.org/package/base-4.21.0.0/docs/Prelude.html#t:FilePath
mkRelFile: https://hackage.haskell.org/package/path-0.9.6/docs/OsPath-Posix.html#v:mkRelFile
So dir </> $(mkRelFile "image.tar") will just be <whatever dir is>/image.tar
james-fossa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
spatten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. 🚢
Overview
Updates
fossa container analyzeto usecirce reexportto normalize the container contents before scanning: fossas/circe#23Acceptance criteria
fossa container analyze nvcr.io/nvidia/cloud-native/gpu-operator-validator:v24.9.0 -ocabal run fossa -- container analyze nvcr.io/nvidia/cloud-native/gpu-operator-validator:v24.9.0 -oTesting plan
Manually validated the images specified here: https://github.com/fossas/circe/blob/main/integration/tests/it/reexport.rs#L12-L36
Before:
After:
Risks
As of the current state of this PR this only affects remote images, not images in a local docker daemon or images which have been exported as tarballs.
The main effect of this risk is that users will still have issues scanning images in the local docker daemon.
Metrics
None
References
Finalizes https://fossa.atlassian.net/browse/ANE-2184
Checklist
docs/.docs/README.msand gave consideration to how discoverable or not my documentation is.Changelog.md. If this PR did not mark a release, I added my changes into an## Unreleasedsection at the top..fossa.ymlorfossa-deps.{json.yml}, I updateddocs/references/files/*.schema.jsonAND I have updated example files used byfossa initcommand. You may also need to update these if you have added/removed new dependency type (e.g.pip) or analysis target type (e.g.poetry).docs/references/subcommands/<subcommand>.md.