Skip to content

waf-detect: a page that quotes a provider's signature in text is still attributed to it #693

Closed

Description

@nc9

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

  1. added
    bug
    P3
    size: M
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3bugsize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions