-
Notifications
You must be signed in to change notification settings - Fork 359
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
feat: Update docker container scanning flag #1350
feat: Update docker container scanning flag #1350
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v2 #1350 +/- ##
==========================================
+ Coverage 68.43% 68.73% +0.30%
==========================================
Files 187 187
Lines 17872 17884 +12
==========================================
+ Hits 12230 12293 +63
+ Misses 4968 4915 -53
- Partials 674 676 +2 ☔ View full report in Codecov by Sentry. |
|
||
err = cmd.Start() | ||
r.Infof("Pulling docker image (%q)...\n", dockerImageName) | ||
err = runCommandLogError(r, "docker", "pull", "-q", dockerImageName) |
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.
What's the CLI output if docker
doesn't exist on the user's system?
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.
Failed to run docker command ("docker pull -q alpine:non-existent-tag"): exec: "docker": executable file not found in $PATH
exec: "docker": executable file not found in $PATH
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.
nice! that's pretty clear to the user.
Resolves google#1316 Update the --docker flag to: - Only accept one image to scan at a time (to make displaying results easier) - Call new image scanning function internally. - Acts like a convenience function for ``` docker save <image-name> > img-name.tar && osv-scanner --experimental-oci-image=img.name.tar ``` TODO: - [x] Add an ACCEPTANCE test which uses docker to pull down a stable image. - [x] Include a docker pull first, as docker save only saves images already on device and does not pull images online.
Resolves #1316
Update the --docker flag to:
TODO: