This commit is contained in:
@@ -11,6 +11,7 @@ import typing
|
||||
|
||||
from rule_hook.rules import Breach
|
||||
from rule_hook.call import Call, text
|
||||
from loop_state.paths import CLAUDE_HOME
|
||||
from project_config.settings import env_files
|
||||
from rule_hook.folder_search import globbed, holds, ignored, searches
|
||||
from command_lines.shell_command import home_word, lexed, OPERATOR, resolved
|
||||
@@ -23,7 +24,7 @@ SEARCHES = "the command searches a folder holding {}, a file of credentials that
|
||||
|
||||
def env_file_breaches(call: Call, home: str) -> list[Breach]:
|
||||
guarded: dict[str, pathlib.Path] = {}
|
||||
for path in (pathlib.Path(home, ".claude", ".env"), *env_files(pathlib.Path(home))):
|
||||
for path in (pathlib.Path(home, CLAUDE_HOME, ".env"), *env_files(pathlib.Path(home))):
|
||||
if path.is_file():
|
||||
# Several configs may name one file: it is checked, and reported, once.
|
||||
guarded.setdefault(os.path.realpath(path), path)
|
||||
|
||||
Reference in New Issue
Block a user