You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Secret-bearing files (.env, keys, credentials) are indexed and returned to agents #2793
Tracked secret-bearing files (.env, .env.local, *.pem, *.key, id_rsa*, .npmrc, credentials.json, …) are indexed like ordinary source. Their contents then reach the graph and are returned to AI agents by search_code and get_code_snippet, so indexing a repository can leak its credentials into agent context, transcripts and logs.
Repro: commit a .env containing DB_PASS=example_secret_123, index the repo, then search_code for example_secret — the value comes back verbatim.
Proposal
Skip secret-bearing files during discovery by default (in every index mode), keep templates such as .env.example / .sample / .template / .dist indexed, and add an explicit opt-in config key (index_secret_files, default false) for users who want .env in the graph (e.g. compose ${VAR} resolution or the DotEnv grammar).
I'm aware #1079 asks for richer .env support; the opt-in keeps that path open while making the default safe. If maintainers prefer the opposite default (opt-out), I'm happy to flip it.
I have a tested implementation ready (DCO signed-off) and will open a PR referencing this issue.
Activity