Skip to content

feat(rules): flag predictable sequential resource IDs in API endpoints (advisory) #2322

In review

Description

@nc9

Endpoints keyed by small sequential integers (/api/orders/1, /api/orders/2) make insecure direct object reference easy to exploit if authorization is weak. A passive advisory rule can spot the pattern in discovered endpoints and JSON id fields without any extra requests.

Acceptance Criteria

  • Rule detects small-integer or sequential id patterns in discovered endpoint URLs (path segments and query parameters); JSON id fields in inline page data moved to sequential-resource-ids: also check id fields in inline page JSON #2369
  • Findings are worded as advisory (IDOR-prone), not a confirmed vulnerability, and state that an unauthenticated crawl cannot prove cross-account access
  • UUIDs and other opaque ids are not flagged
  • No cross-account or id-enumeration requests are sent (passive, runs with no --probe flag)
  • Fixture tests and a docs page under docs/rules/security/

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. assigned and unassigned on Nov 25, 2026
  5. removed
    in-progress
    on Nov 25, 2026
  6. longshore-nc9 commented on Nov 25, 2026

    @longshore-nc9
    Contributor

    AC1 narrowed (design decision): the rule detects small-integer ids in discovered endpoint URLs (path segments and query strings). JSON id fields in response bodies, including bodies the crawl already fetched, are out of scope for this rule because site rules do not receive fetched bodies; that follow-up is #2369. The rule stays passive and sends no request.

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