Skip to content

fix(audit): nginx configs survive candidate collection — the NGX family was unreachable (#1979 follow-up) - #2056

Merged
lex00 merged 1 commit into
mainfrom
fix/nginx-candidate-paths
Sep 1, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/nginx-candidate-paths

Conversation

@lex00

@lex00 lex00 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The gap

#2054 wired auditNginxConfigs(candidates) into the CLI, but isCandidatePath (which bounds both the local walk and the remote fetch) never admitted a .conf — so no nginx file ever reached the scanner. Every path-level test called the scanner directly with constructed files, masking it. Found while proving the hosted path end to end on blacklight's 0.54.0 bump: the fixture's nginx/default.conf produced zero findings.

Fix

  • isCandidatePath includes isNginxConfigPath — the same ride-along shape wrangler.toml uses. The two-stage design is unchanged: the path filter stays broad, content confirmation (nginx marker directives) stays at parse time, so a systemd-style conf.d/ drop-in is collected but contributes nothing. .conf gets no hintLexiconForFile entry, so it never shows up as an unclaimed-lexicon nag.
  • The missing test class: two auditCommand-over-a-real-directory tests — NGX003 fires end to end with zero lexicons installed, and the systemd drop-in stays silent. A scanner-level unit test cannot catch a filter that drops the file first.

Full audit + CLI suites (249) green; repo-wide typecheck no regressions.

🤖 Generated with Claude Code

…ly was unreachable (#1979 follow-up)

The NGX scanner shipped wired into the CLI while isCandidatePath never
admitted a .conf, so neither the local walk nor the remote fetch ever
handed it a file: the checks were dead on both paths. Found proving the
hosted path on blacklight's 0.54.0 bump — the fixture's nginx file
produced zero findings.

isCandidatePath now includes the scanner's own path detector, the way
wrangler.toml rides along; content confirmation (a systemd-style conf.d
drop-in) stays at parse time in the scanner. New end-to-end tests run
auditCommand over a real directory — the whole-path proof the family
shipped without, since a scanner-level unit test cannot catch a filter
that drops the file first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lex00
lex00 merged commit d41c4f6 into main Sep 1, 2026
5 checks passed
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.

1 participant