You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: give rules a capped body for 4xx/5xx pages (error-page info disclosure) #2393
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