Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sebhoss
Copy link
Contributor

@sebhoss sebhoss commented Mar 17, 2023

Fixes #215 by adding another action input that toggles whether the --add-cpes-if-none flag is added to the grype command arguments.

There are some local test failures but these seems to be caused by a missing OCI registry on localhost:5000 which I did not have. I've tested this change just now in metio/devcontainers@bbb47b0 and can see the correct results in an action run, e.g. at https://github.com/metio/devcontainers/actions/runs/4445318515/jobs/7804325686 (job name is "Scan Image with Grype")

sebhoss added 5 commits March 17, 2023 08:55
We want the user to be in control whether this flag is set or not. The previous behavior was not to add the flag, thus the default value here was set to 'false' in order to keep the current behavior.

Signed-off-by: Sebastian Hoß <[email protected]>
Similar to the only-fixed action input, we simply read the user provided value or fallback to the default and the --add-cpes-if-none flag to the arguments of grype in case the action input is set to 'true'.

Signed-off-by: Sebastian Hoß <[email protected]>
In order to use the new flag & test it, we need to rebuild the dist bundle.

Signed-off-by: Sebastian Hoß <[email protected]>
Copy link
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- thanks for adding a test!

@kzantow kzantow merged commit 2d91349 into anchore:main Mar 17, 2023
@sebhoss sebhoss deleted the issue-215 branch March 17, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add support for --add-cpes-if-none

2 participants