Skip to content

tech-detect: a Next.js flight script re-opens the prose, link and metadata false-positive classes for script-url signatures #1437

Closed

Description

@nc9

Found in review of #1436. A Next.js App Router flight script (self.__next_f.push(...)) is read as one block of strings so the layout's next/script loader snippet is found. The same block carries everything the page renders into its React tree, so a vendor URL that only appears as content (a JSON-LD sameAs, a meta description, a CSP <meta>, a link, prose) also matches inside it. v0.0.147 had the same effect for all HTML; v0.0.149 removed it, and the flight exception brings it back for Next.js pages.

Acceptance Criteria

  • A Next.js flight payload that carries a vendor only as a JSON-LD sameAs, a meta description, a CSP meta, an <a href> or prose does not detect that vendor
  • The layout next/script loader snippet in the same payload is still detected
  • The flight read is scoped to script loader shapes (a src of a script component, an inline snippet's own source), not the whole payload
  • Tests cover each negative and the positive in one fixture
  • The docs sentence about the flight exception is removed

Activity

  1. added
    bug
    size: S
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.151 (34f527c5), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.151

    nik

  4. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    One doc nit for a later pass: docs/cloud/technologies.mdx says a flight script is read up to 2 MB each, while flight.ts caps the decoded text at 8 MB; the two caps are not obviously the same thing and the sentence could say which is meant. The real Next.js build fixtures (11, trimmed HTML) under packages/tech-detect/tests/fixtures/next-build are what the loader tests run against.

    nik

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

    bugsize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions