Skip to content

fix(waf-detect): a small Cloudflare page with the JavaScript Detections script is classified as a challenge page #666

Closed

Description

@nc9

Summary. A small page (under 10 KB) served through Cloudflare that carries Cloudflare's JavaScript Detections inline script is classified as a bot-challenge page and dropped from scoring. The page is a normal page.

Seen on 0.0.108 (local fixture, public-looking host). Detected 3 challenge/interstitial page(s) via Cloudflare. The detection is the /challenge-platform/i content pattern together with Server: cloudflare, checked in packages/rules/src/waf-detect/challenge.ts (around line 152) against providers.ts (around line 116). The /challenge-platform/ path is also what the JavaScript Detections beacon uses on ordinary pages (related: #605).

Impact. Normal pages on Cloudflare sites that use JavaScript Detections are excluded from scoring, so scores and page counts are wrong.

Acceptance Criteria

  • A page that only carries the JavaScript Detections snippet (no challenge markup, a 200 response, ordinary content) is not classified as a challenge page.
  • A real Cloudflare challenge or interstitial page is still detected.
  • A test covers both: a JSD-only small page and a real challenge page.
  • The finding for a real challenge keeps its provider name and page count.

Activity

  1. added
    bug
    P2
    size: S
    rules
    on Oct 11, 2026
  2. nc9 commented on Oct 12, 2026

    @nc9
    ContributorAuthor

    Fixed in # and merged to main. Every acceptance criterion is met per the PR description, with before and after evidence from the CLI on local fixtures, tests that fail on the old code, and review comments triaged. Criteria ticked.

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

    P2bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions