Repository navigation
feat(rules): security/info-disclosure for stack traces, paths, debug pages and database errors - #2389
Merged
Merged
Conversation
5 tasks
nc9
marked this pull request as ready for review
November 26, 2026 05:42
longshore-nc9
Bot
force-pushed
the
feat/info-disclosure-2334
branch
3 times, most recently
from
November 26, 2026 17:25
f603749 to
dc8aede
Compare
longshore-nc9
Bot
force-pushed
the
feat/info-disclosure-2334
branch
from
November 27, 2026 18:47
dc8aede to
cb12c73
Compare
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.
Part of #2334. Error-page coverage moves to #2393.
Adds a shared classifier (
packages/rules/src/shared/info-disclosure.ts) and the page rulesecurity/info-disclosure. It reads the visible text of each crawled 2xx page (script, style, template and noscript are skipped) and reports the first match with a snippet capped at 160 characters. The crawler stores no body for a 4xx/5xx response, so error pages never reach the rule yet; giving rules a capped error body is #2393, which is blocked on this PR. The status-aware path logic stays in the shared classifier (scansPathsFor, unit-tested): a bare filesystem path counts only on a 4xx/5xx response, so on today's 2xx-only input bare paths are not reported. It does not read headers, so version numbers stay withsecurity/version-disclosure.A framework or driver identifier on its own (
Illuminate\,Symfony\Component\,ActiveRecord::,ActionController::RoutingError,System.Web.*Exception,mysqli::,mysqli_*(),PG::,ORA-NNNNN:) does not fail a page: it needs a trace or error shape right after it (file and line,#0,Stack trace:, anat pkg.Class(frame,Rails.root:), or a known error form such asPG::X: ERROR:orWarning: mysqli_x():. Rails, Symfony and Laravel docs prose and a php.net mysqli page pass. Text in separate block elements (cells, paragraphs, list items) is joined with a line break, so a trace split across<td>s is found.Rule count reaches 360, so the rounded floor moves to 360+ (constant plus every copy). The private repo's website copy states the same floor and needs the same bump.
Golden pins:
healthScore.overall58 to 59 (500 passes, same shape as token-storage), one new line in canonical-rule-totals.json, finding-messages snapshot updated.Commands run:
scripts/test-suites.ts --run rules(13012 pass, 0 fail),--run rest(3968 pass, 0 fail), canonical golden, golden-finding-messages, registry-wide tests,bun run docs:check, typecheck in packages/rules, oxfmt and oxlint on the changed files, changelog check. ReDoS scaling of the new trace-window patterns checked at 50k and 200k characters (linear).Not done: the real-page smoke test of about 25 sites (step 9); residual false positives are pages that quote real errors or traces.
Docs: security/info-disclosure page, security hub, counts. Skill: none.