Skip to content

Avoid false password warnings on JavaScript credential lookups - #6

Merged
zztimur merged 5 commits into
mainfrom
codex/password-lookup-false-positive
Sep 7, 2026
Merged

zztimur merged 5 commits into
mainfrom
codex/password-lookup-false-positive

Conversation

@zztimur

@zztimur zztimur commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

A JavaScript password variable initialized from CLI flags or environment variables currently triggers a bundled-password warning. Recognize complete lookup-only declarations in .js/.mjs/.cjs files while retaining warnings for hardcoded values, literal fallbacks, later assignments, and text configuration files.

The exception requires a complete single-line declaration ending in a semicolon. Earlier template delimiters leave the context uncertain, so those files retain the warning even when a preceding template appears closed. This deliberately conservative fix does not change output redaction, public finding codes, severity, CLI arguments, or the report schema. Credential/network dependency reporting remains separate in #5.

Validation:

  • Regression-only commit0398de1: 212/222 runtime checks passed; exactly10 lookup cases reproduced the false positive.
  • Review found a template-string masking risk. Regression commit4241f7f: 230/232 checks passed; exactly2 template cases exposed the missing warning, then a conservative guard was added.
  • Final branch CI 34071495913 passed all seven jobs at commit873f4af; review has no remaining actionable findings. Fixtures cover real folder/ZIP inspection, inside/outside-root files, literals, fallbacks, mixed assignments, and unsupported syntax.

Fixes #4.

@zztimur
zztimur marked this pull request as ready for review September 7, 2026 01:02
@zztimur
zztimur merged commit da82176 into main Sep 7, 2026
14 checks passed
@zztimur
zztimur deleted the codex/password-lookup-false-positive branch September 7, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid password warnings for JavaScript credential lookups

1 participant