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

Configuration search path logic mismatches on ./config.yaml #960

Closed
victor-li opened this issue Oct 20, 2022 · 2 comments
Closed

Configuration search path logic mismatches on ./config.yaml #960

victor-li opened this issue Oct 20, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@victor-li
Copy link

As defined in the https://github.com/anchore/grype/blob/main/README.md#configuration section, Grype should have the following configuration search paths:

  • .grype.yaml
  • .grype/config.yaml
  • ~/.grype.yaml
  • <XDG_CONFIG_HOME>/grype/config.yaml

and should not match on ./config.yaml.

On this line:

v.AddConfigPath(".")
the current directory is added to Viper's config paths, but is not removed from the config paths to check step 2.

@spiffcs spiffcs added this to OSS Oct 20, 2022
@kzantow
Copy link
Contributor

kzantow commented Oct 20, 2022

Hi @victor-li very nice find! It looks like we may not be replacing the path the right way, but instead appending to it. We'll add this to the backlog.

@kzantow kzantow moved this to Backlog (Pulled Forward for Priority) in OSS Oct 20, 2022
@wagoodman wagoodman added the good-first-issue Good for newcomers label Oct 20, 2022
@spiffcs spiffcs added the bug Something isn't working label Oct 29, 2022
@kzantow
Copy link
Contributor

kzantow commented Feb 14, 2024

This was fixed as part of the CLIO port: #1437

@kzantow kzantow closed this as completed Feb 14, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in OSS Feb 14, 2024
@kzantow kzantow closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants