Skip to content

sequential-resource-ids: also check id fields in inline page JSON #2369

Description

@nc9

Follow-up to #2322. The sequential-resource-ids rule reads endpoint URLs only (path segments and query parameters). Inline JSON in pages (framework data, application/json script tags) can also expose small or sequential record ids, which the site pass can't see today because it has no DOM.

Add a bounded per-page collector that pulls id-like fields from inline page JSON, and feed it to the same advisory check.

Acceptance Criteria

  • A per-page collector extracts id-like keys (same key rules as the URL check) from inline JSON in the page, with hard caps on bytes read, depth and fields kept per page
  • The sequential-resource-ids rule flags small-integer or sequential ids found in those fields, with the same advisory wording as the URL findings
  • UUIDs and other opaque ids are not flagged
  • Passive only: no extra requests are sent
  • Fixture tests cover a page with sequential JSON ids, one with UUIDs, and one over the size cap; the docs page under docs/rules/security/ mentions JSON ids

Activity

  1. added
    enhancement
    size: M
    rules
    on Nov 25, 2026
  2. added theissue type on Nov 25, 2026
  3. added
    in-progress
    on Nov 25, 2026
  4. self-assigned this
    on Nov 25, 2026
  5. removed
    in-progress
    on Nov 26, 2026
  6. removed their assignment
    on Nov 26, 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

    enhancementrulessize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions