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
waf-detect: a page that quotes a provider's signature in text is still attributed to it #693
Summary. WAF body attribution (CONTENT_PATTERNS in packages/waf-detect/src/providers.ts) is a set of regexes over the first 10 KB of raw HTML. After #667 (PR #692) they match what each provider's infrastructure emits instead of the provider's name, but a page that QUOTES one of those signatures is still attributed: a tutorial showing <script src="https://js.datadome.co/tags.js"> in a code block, a support page printing Incapsula incident ID: 1234-5678, a Cloudflare troubleshooting page that mentions /cdn-cgi/challenge-platform/. The attribution feeds the report's technologies, the challenge-page gate on 200 pages, and 403 classification of external links.
Direction. Read script and resource signatures only from where they act: <script src> values, inline <script> bodies, <iframe src>, and the <title>/first heading for block-page wording, not text inside <pre>, <code> or paragraphs. The engine already parses each page, so this could take the parsed elements rather than regexes over HTML.
Acceptance Criteria
A page whose only provider signature sits inside <pre>, <code> or paragraph text is not attributed to that provider.
The same signature in a <script src>, inline script, or <iframe src> is still attributed.
Every positive in packages/waf-detect/tests/content-signatures.test.ts still passes, and quoted variants of each are added as negatives.
Activity
fix(waf-detect): a signature counts where it acts, not where a page q…