Repository navigation
fix(engine): local link checks list walls and timeouts as unverified, not broken #800 - #804
Conversation
…5 stay broken #800 Review round 1 on #804: walls and timeouts, local or from the cloud bulk checker, are not cached, so a signed-in run asks the cloud next time. An object store's 403 (S3, GCS), an HTTP auth prompt and a 405 that allows no GET stay broken. Stale wall verdicts are re-checked only when cached before 2026-11-16. Tests: Retry-After 503, HEAD 405/GET 404, cache cases, 2 s timeouts except the stall. Notice and docs wording. Signed-off-by: Nik Cubrilovic <[email protected]>
…te's own refusal #800 Delta review on #804: CloudFront in front of S3 can strip S3's headers, so a 403 whose body is <Code>AccessDenied|NoSuchKey</Code> stays broken; a 401 naming Basic, Digest, Negotiate or NTLM anywhere in WWW-Authenticate stays broken. The CDN's own HTML block page is still a wall. Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #804. I read the diff and the surrounding rule code but did not run the test suite. The change is coherent and matches the description. Walls and timeouts are now unverifiable and are never cached. The
Test coverage is good: engine, rule and CLI notice tests were added. |
… not broken #800 A link checked from the user's machine that answers 401, 403 (vendor named or not), 405, 406, LinkedIn's 999 or a 503 challenge page, or runs out of time, is unverifiable: listed under waf-blocked-external-links, never broken. 404, 410, a plain 503, a refused connection stay broken. Timeouts are not cached; a cached wall or timeout from before is asked again. Both link rules exempt any wafBlocked link, not only a 403. A signed-out audit with unverified links prints a notice pointing at sign-in. Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
…5 stay broken #800 Review round 1 on #804: walls and timeouts, local or from the cloud bulk checker, are not cached, so a signed-in run asks the cloud next time. An object store's 403 (S3, GCS), an HTTP auth prompt and a 405 that allows no GET stay broken. Stale wall verdicts are re-checked only when cached before 2026-11-16. Tests: Retry-After 503, HEAD 405/GET 404, cache cases, 2 s timeouts except the stall. Notice and docs wording. Signed-off-by: Nik Cubrilovic <[email protected]>
…te's own refusal #800 Delta review on #804: CloudFront in front of S3 can strip S3's headers, so a 403 whose body is <Code>AccessDenied|NoSuchKey</Code> stays broken; a 401 naming Basic, Digest, Negotiate or NTLM anywhere in WWW-Authenticate stays broken. The CDN's own HTML block page is still a wall. Signed-off-by: Nik Cubrilovic <[email protected]>
…ache #800 After the rebase onto pub#802 the link cache is used only under a public-only egress policy, so the cache tests use the bulk checker and cached answers, not the loopback server. One cacheableVerdict() decides both cache writes (throttled, refused and unverifiable verdicts are never cached). Signed-off-by: Nik Cubrilovic <[email protected]>
d0480bb to
63536b1
Compare
|
Review of PR 804 (pub#800: walls and timeouts listed as unverifiable, not broken). I read the diff and traced
Positives: the notice helper is cleanly separated and tested, |
Closes #800.
A link checked from your own machine that meets a wall is now unverifiable, not broken. That covers a logged-out audit, and a link the cloud checker did not answer in time. Before this, a logged-out audit's broken external link list was mostly links that work in a browser.
What changes
Engine (
external-checker.ts). These local answers come backwafBlockedand keep their status. They name a vendor whendetectWaffinds one, and sayunknownwhen it doesn't:cf-mitigated: challenge, or whatdetectWafChallengePagereads as one. A plain 503 stays broken, and a 503 withRetry-Afterstays rate limited.The site's own refusals stay broken:
x-amz-request-idorserver: AmazonS3, GCSx-guploader-uploadid;<Code>AccessDenied|NoSuchKey</Code>), for CloudFront in front of S3 with the headers stripped. The CDN's own HTML block page is still a wall.WWW-Authenticatenaming Basic, Digest, Negotiate or NTLM, anywhere in the header;Allowheader leaves out GET.Cache handling:
Rules.
links/broken-external-linksandlinks/dead-linksnow exempt anywafBlockedlink, not only a 403. Those links are listed underwaf-blocked-external-links("status unverifiable"), the same list the cloud link checker's unverifiable links already go into.CLI. A signed-out audit with unverifiable external links prints this once after the audit:
A saved account the audit could not use this run (too few credits, a spend cap below the minimum, an outage) gets "An audit that can use the cloud (signed in, with enough credits) checks them…" instead. A signed-in audit, or one with no such links, prints nothing.
Still broken: 404, 410, a plain 5xx, a domain that does not exist, a refused connection, an invalid certificate.
Docs and CHANGELOG.
rules/links/broken-external-linksandrules/links/dead-linkssay which local answers are unverifiable. CHANGELOG has an entry under Changed.Tests
packages/audit-engine/tests/local-link-walls-800.test.ts(12), against real local servers. After the rebase onto pub#802, the link cache is only used under a public-only policy, so the cache cases go through the bulk checker and cached answers rather than the loopback server. OnecacheableVerdict()now decides both cache writes. A raw socket serves the 999. It covers:Bearer, NTLM401 and a POST-only 405 staying broken, while the CDN's HTML block page stays a wall;packages/rules/tests/local-link-walls-800.test.ts(3): both rules list walls and timeouts as unverifiable and count only the 404.apps/cli/tests/audit/local-link-notice-800.test.ts(3): the notice, its singular, the variant for an account that couldn't be used, and no notice when signed in or when nothing is unverified.fetch-deadline.test.ts: a 403 whose body stalls is now unverifiable. That test pinned the old "plain 403 = broken" ambiguity.Review
Opus delta (
41840a2..d787dbe): safe to merge, no HIGH or MEDIUM. Its two LOWs are fixed in d0480bb: the S3 XML error body behind a CDN, and HTTP auth schemes anywhere in the header.Opus round 1 (
2b7c1d4..41840a2). Fixed in d787dbe:Kept as they are:
blocked by WAFmessage. The private rule catalog quotes them, so a change there would ride every gitlink bump for a wording nit.Gates
tangly check --strictpasses.bun run src/cli.ts audit <localhost fixture> --external-links, signed out with a throwaway HOME. The fixture links to 401, 403, 405, 406, 404, 410, 200 and one stalled link. Result: 5 unverifiable,2 broken external link(s): 1 with 404, 1 with 410, and the notice printed once.Agent skill (
squirrelscan/skills): no change needed. The report's rule ids and check names are unchanged.