cli
cli copied to clipboard
fix: exclude-base-image-vulns to work with autodetected base image
- [x] Follows CONTRIBUTING rules
What does this PR do?
Fixes an issue where --exclude-base-image-vulns
does not work properly when the base image is auto detected, without using --file
How should this be manually tested?
snyk container test alpine:3.10
with/without --exclude-base-image-vulns
Warnings | |
---|---|
:warning: |
Since the CLI is unifying on a standard and improved tooling, we're starting to migrate old-style
|
Generated by :no_entry_sign: dangerJS against 5daf6912b1c30256c1a2dec507d47d321890ae44
my updates:
- stop tests from blowing up by adding optional chaining to
dockerRes.baseImage
- added vuln info to fake-server in a manner that would enable us to test excluding base image vulns (PS, I am not very prod in the manner that it's done. welcoming suggestions!)
- made sure that
has no vulns with flag without a dockerfile
tests failed if code is reverted to the way it was before
note: I added the tests under the windows exclusion. the current --exclude-base-image-vulns test was already there, and those tests do in fact don't pass the windows suite. not entirely sure why it's needed. dropped a question in the commit that introduced it.
🧹 Closing as stale.