Skip to content

tech-detect: the generated Imperva fingerprint only matches X-CDN: Incapsula #646

Closed

Description

@nc9

Found while reviewing pub#643 (waf-detect now recognises both `x-cdn: Incapsula` and `x-cdn: Imperva`). The tech-detect generated fingerprint for Imperva has the same Incapsula-only `X-CDN` pattern, so a site that sends `X-CDN: Imperva` is detected by waf-detect but not by tech-detect.

Acceptance Criteria

  • A response with `X-CDN: Imperva` is detected as Imperva by tech-detect, same as `X-CDN: Incapsula`
  • A test pins both header values, and `X-CDN: Fastly` is not detected as Imperva
  • The generated fingerprint source (not just its output) is changed so a regeneration keeps the fix

Activity

  1. added
    bug
    P3
    size: XS
    rules
    on Oct 11, 2026
  2. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    Could not show this in a local audit on 0.0.108. In a local audit (signed out or --offline), technology detection only sees a fixed set of response headers (content-type, server, cache headers, link, CSP and a few more), and X-CDN and X-Iinfo are not among them, so neither X-CDN: Incapsula nor X-CDN: Imperva produced a technology in my fixture runs. That header list is buildHeaderMap in apps/cli/src/audit/cloud.ts.

    origin/main still has the fingerprint as described: packages/tech-detect/src/fingerprints/generated.ts matches X-CDN against Incapsula only. Its generator reads packages/tech-detect/data/research-fingerprints.json, which is not in the repository (data/ is in .gitignore), so the third criterion needs that file restored or the source moved somewhere tracked.

  3. nc9 commented on Oct 11, 2026

    @nc9
    ContributorAuthor

    From the repro run: the generator input packages/tech-detect/data/research-fingerprints.json is gitignored (data/) and not tracked in either repo, so the generated Imperva fingerprint cannot be regenerated from the repo. The fix needs the input tracked, or the rule moved to a tracked override file. Also, the local CLI only passes a fixed header subset to tech-detect (buildHeaderMap in cloud.ts), so X-CDN is never seen in a local audit.

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

    P3bugrulessize: XS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions