Repository navigation
Conversation
4 tasks
Contributor
Author
|
Follow-up for the Netlify and Fastly samples: #1328 |
nc9
force-pushed
the
fix/waf-followups-1258
branch
2 times, most recently
from
October 30, 2026 07:18
ff2e9ce to
e56b293
Compare
…n, Wordfence needs its markup #1258 Signed-off-by: Nik Cubrilovic <[email protected]>
…pts timestamp or script, test other redirectors #1258 Signed-off-by: Nik Cubrilovic <[email protected]>
…1258 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/waf-followups-1258
branch
from
October 30, 2026 09:46
e56b293 to
37d17ac
Compare
Contributor
Author
|
Landed in v0.0.144 as nik |
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.
Refs #1258 (AC 1 to 3 done; the sample part of AC 4 needs real responses, see below). Does not close it.
Changes, by item
/redirects to/challenge(a Cloudflare challenge) and the sitemap lists/; the report hadwafBlocked.total: 2, the destination asseedand the typed URL underpages. The fetcher now records where a blocked response was served after redirects (WafBlockInfo.finalUrl), the crawler treats a blocked fetch that landed on the seed's destination as the seed, andaddWafBlockedPageignores a second sighting of the seed. Result:total: 1,pages: []. The outcome and exit code 3 are unchanged.suspectdid nothing. Two things made it invisible. The detector ran but nothing consumed its verdict, and the pages it fits do not reach the audit as plain pages: a 4xx comes back as a stored error-page record, and a bare 403 fails asblocked. Both places now classify the response and recordsuspectpages in crawl stats (wafSuspect:total, up to 50pages,providers) and on the report (AuditReport.wafSuspect). The console printsNote: N page(s) look like a refusal from <provider> but carry no block marker...with the pages, the text and Markdown reports carry a "Suspect pages" block, and JSON haswafSuspect. Page handling is unchanged: the fetch fails or stores exactly as before. LLM, XML and HTML reports are not changed in this PR.document.write(new Date().toUTCString())script in the markup view, so a 403 that copies the heading and the "Generated by Wordfence" footer wording is not attributed. Near-miss fixture added; the real-shaped Wordfence fixtures (503 and 403) still match. Evidence for the script is a public support-forum post quoting a block page ("Generated by Wordfence at ... Your computer's time: ...") and my recall that the time is filled by that script; I have not seen the raw HTML of a live Wordfence block, so this is not live-verified.406by default, configurable, with no documented body (custom response codes). Both are now written up indocs/guides/failed-audits.mdx. The AC checkbox for a real sample stays open until someone triggers a block on a Netlify or Fastly NGWAF test site and shares the headers and body.Tests
apps/cli/tests/cli/audit-waf-followups-1258-e2e.test.ts: real CLI against local sites: the redirecting-seed case (exit 3,total1,pagesempty, seed is the destination); a home page linking to a 406 and a 403 that read as Cloudflare refusals: audit completes,wafSuspect.total2 with both pages, console warning present. The first case failed withtotal: 2before the fix.packages/core-contracts/tests/waf-suspect-1258.test.ts,packages/report/tests/waf-suspect-1258.test.ts, the new Wordfence near-miss inpackages/waf-detect/tests/fixtures/waf-blocks.ts.status-guards, audit-engine waf tests,scripts/test-suites.ts --run report(1031), cli lint, format:check and tsgo, tsgo on crawler, report, core-contracts, audit-engine and waf-detect,make validate.Docs:
docs/guides/failed-audits.mdx,docs/configuration/output.mdx. Skill: no change needed.Review round
suspectis now a console note (plain, not a yellow warning). It fires on any refusal-shaped short 4xx whose headers name a provider, so a site's own403 Forbiddenbehind Cloudflare will also be noted. I have not measured how often that happens on real sites (no corpus run), so the rate is unknown, not low. Marker-based tightening is impossible by definition (suspect means no marker); the note is a pointer, not a verdict. This is a reading of "visible warning" in the AC; say if you want the yellow warning back.pages): test and behaviour stated.Delta review round (rebased onto v0.0.143)
wafSuspectLinesis singular for one page ("1 page looks like a refusal ... but carries no block marker", tested). The LLM report now carries a<waf-suspect>element (tested); the XML and HTML reports do not, and the docs and CHANGELOG say so.