Skip to content
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

Fail if explicitly specified config file is absent #2018

Open
metametadata opened this issue Jul 30, 2024 · 1 comment
Open

Fail if explicitly specified config file is absent #2018

metametadata opened this issue Jul 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@metametadata
Copy link

metametadata commented Jul 30, 2024

What would you like to be added:

The app should exit with error message and exit code 1 if the explicitly specified config file doesn't exist. For example, this currently doesn't fail if foo.yaml doesn't exist:

grype --config foo.yaml .

Why is this needed:

On developer mistakes the scanner silently switches to the default configuration, missing CVEs which could be found with the appropriate config (e.g. which sets add-cpes-if-none=true).

Additional context:

v0.79.3

@metametadata metametadata added the enhancement New feature or request label Jul 30, 2024
@kzantow
Copy link
Contributor

kzantow commented Jul 30, 2024

Developer note: we might need a change related to this one from @wagoodman to either return a boolean to mark something as required or return an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

2 participants