anchore / anchore/fangs

Config file read twice if $CWD is same as config dir, e.g. $HOME

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
17
Forks
5
PR merge metrics
No merged PRs in 30d

Description

If a user runs from the $HOME directory (or any of the configuration directories), where a config file exists, the `$CWD/` is found, in addition to the `/`. E.g. `$HOME/.syft.yaml` exists, and syft is run from `$HOME`, the same file is read twice.

See: https://github.com/anchore/syft/issues/4322

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no repository files or tests; begin by tracing the configuration-file discovery and loading path that checks $CWD and configuration directories. Reproduce the case where $HOME/.syft.yaml is found from $HOME, then verify that the same file is loaded only once and cover that behavior with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.