Repository navigation
fix(engine): custom headers stay on the audited origin; probes follow redirects by hand #732 #820 - #957
Conversation
…the audited origin #2831 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff and the Findings
Checked
I did not run the test suite. |
…only on asset requests #732 #820 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff and read The change looks sound.
No blocking issues found. |
|
Negative control done: with the probe fetch reverted to native redirect: follow, probe-redirect-headers.test.ts fails 6 of 10 (cross-origin header leak for the helper, cloaking probe and soft-404 confirmation, plus both metadata-redirect cases); on this branch all 10 pass. |
Closes #820, closes #732. Refs private issue #2831 (same class).
What
lib/probe-fetch.ts) oversafeRedirectFetch: headers dropped on a cross-origin hop, every hop vetted by the own-site egress policy (link-local and metadata refused, LAN allowed). Same-origin unchanged. (soft-404 confirmation re-fetch can send custom request headers across a redirect to another origin #820)[crawler] header_hostsor--header-host. Completions and docs updated. An asset on another host answering 401/403 without them is reported as not checked inreliability/broken-resourcesandmobile/web-app-manifest, naming the host. (Custom request headers reach every subdomain of the audited host: limit them to the audited origin #732)Why: a subdomain is not always run by the site's owner (user content, SaaS CNAMEs, dangling CNAMEs), and these headers usually carry credentials.
Tests:
probe-redirect-headers.test.ts(two loopback origins: cross-origin hop gets nothing, same-origin keeps, metadata refused, LAN soft-404 still confirms),header-scope-732.test.ts(scope rules, resource and script pools), rule tests for the 401 verdict.Notes
egressPinnedByTransportonrunStreamingRulesfor the hosted caller.skills: no change