Repository navigation
fix(audit): nginx configs survive candidate collection — the NGX family was unreachable (#1979 follow-up) - #2056
Merged
Merged
Conversation
…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>
11 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
#2054 wired
auditNginxConfigs(candidates)into the CLI, butisCandidatePath(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'snginx/default.confproduced zero findings.Fix
isCandidatePathincludesisNginxConfigPath— the same ride-along shapewrangler.tomluses. The two-stage design is unchanged: the path filter stays broad, content confirmation (nginx marker directives) stays at parse time, so a systemd-styleconf.d/drop-in is collected but contributes nothing..confgets nohintLexiconForFileentry, so it never shows up as an unclaimed-lexicon nag.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