Skip to content

engine: give rules a capped body for 4xx/5xx pages (error-page info disclosure) #2393

Backlog

Description

@nc9

Follow-up to #2334 and #2389.

The crawler keeps no response body for 4xx and 5xx pages (packages/crawler/src/core/crawler.ts, html: null), so no rule can read an error page. security/info-disclosure (#2389) needs those bodies to find stack traces, filesystem paths and database errors on error pages, which is where they usually appear. #2389 now covers 2xx pages only; this issue covers error pages.

Give rules a size-capped copy of the body of 4xx and 5xx HTML responses. Keep it separate from html, so the rules that read html don't start seeing error pages.

Acceptance Criteria

  • A 4xx or 5xx HTML response to a crawled URL keeps a body capped at a fixed size (stated in the code and docs), in a field separate from html
  • Every rule that read html before this change produces the same results on a fixture site that has error pages (canonical golden unchanged)
  • security/info-disclosure reports a traceback served with a 500 status and a filesystem path served with a 404 status, shown by an engine-level test that runs a real crawl of a local server
  • A crawl of a site with many broken links stays within a stated memory bound for the stored error bodies
  • The info-disclosure docs page says error pages are checked, and from which version

Activity

  1. added
    enhancement
    size: M
    rules
    security
    engine
    blocked
    on Nov 25, 2026
  2. added theissue type on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedengineenhancementrulessecuritysize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions