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 }}
This repository was archived by the owner on Jul 4, 2026. It is now read-only.
config.secret_in_env (in configaudit.py) only flags an env value when it
matches a known token shape (_ENV_SECRET) or the key name looks
secret-ish. A high-entropy literal under a generic key name — e.g. {"DATABASE_URL": "postgres://user:S3cr3tP@ss@host/db"} — is not flagged, and
embedded credentials in connection strings are a common real-world leak.
Impact
Medium false-negative. Config files sync to disk/cloud; a DSN with an inline
password leaks exactly like an API key. Today only key-name or token-prefix
heuristics catch it.
Suggested fix
Add a connection-string / scheme://user:pass@host detector to the env-value
scan (and reuse it for the manifest scan), being careful to still honor the
existing env-reference negative (${VAR} / $VAR / %VAR%) so we don't create
false positives on templated values.
Notes
Keep the redaction behavior (only a short prefix of the secret is shown in the
finding message) — see the existing config.secret_in_env message construction.
Summary
config.secret_in_env(inconfigaudit.py) only flags anenvvalue when itmatches a known token shape (
_ENV_SECRET) or the key name lookssecret-ish. A high-entropy literal under a generic key name — e.g.
{"DATABASE_URL": "postgres://user:S3cr3tP@ss@host/db"}— is not flagged, andembedded credentials in connection strings are a common real-world leak.
Impact
Medium false-negative. Config files sync to disk/cloud; a DSN with an inline
password leaks exactly like an API key. Today only key-name or token-prefix
heuristics catch it.
Suggested fix
Add a connection-string /
scheme://user:pass@hostdetector to the env-valuescan (and reuse it for the manifest scan), being careful to still honor the
existing env-reference negative (
${VAR}/$VAR/%VAR%) so we don't createfalse positives on templated values.
Notes
Keep the redaction behavior (only a short prefix of the secret is shown in the
finding message) — see the existing
config.secret_in_envmessage construction.