Repository navigation
feat(rules): flag predictable sequential resource ids in API endpoints (advisory) #2322 - #2365
longshore-nc9[bot] wants to merge 4 commits into
Conversation
Automated reviewReviewed head Findings1. [verified, blocking] Every WordPress post or page gets an "IDOR-prone" warning for its public REST link
So a large share of the web (any WordPress site whose crawl reaches a post or page) gets an IDOR advisory about public content. WordPress REST already enforces post visibility. The PR body does not report the AGENTS.md step 9 smoke test on about 25 real websites, which would have caught this. Suggested fix: exclude 2. [verified, minor] 3. [verified, minor] Cursor and pagination keys 4. [verified, minor] 5. [verified, minor] The PR will not close #2322 Things I checked that hold up:
Acceptance criteria (#2322)
Checks run locally (CI has not run)
Evidence: skipped. This is not a visual run. VERDICT: changes-requested |
Automated reviewDelta review of head Previous findings
The tests bite: I reverted the three code changes, and the 5 new negative tests failed ( New findings (none blocking)
Acceptance criteria (#2322)
Checks run locally (CI has not run)
Evidence: skipped. This is not a visual run: #2322 has no VERDICT: approve |
62770e3 to
7dd0557
Compare
…s (advisory) #2322 Signed-off-by: nc9 <[email protected]>
…al-resource-ids #2322 Signed-off-by: nc9 <[email protected]>
…source-ids #2322 Signed-off-by: nc9 <[email protected]>
…rce-ids #2322 Format the query-key condition as oxfmt writes it. Fold case, - and _ when matching cursor keys and add next, prev and until. Flag a number after services again, since /api/services/42 is a record. Cover the WordPress head markup end to end through the endpoint surface. Signed-off-by: nc9 <[email protected]>
7dd0557 to
58c8982
Compare
Adds
security/sequential-resource-ids, a passive advisory rule. It reads the endpoint discovery results and flags same-origin API endpoints keyed by a small integer (/api/orders/42, or?user_id=7on an API path), grouped per path pattern. It sends no request at any probe level. UUIDs, ULIDs, hashes, slugs, long numbers, counters (page,v1,limit,year) and plain navigation links are not flagged. Findings are warnings worded as IDOR-prone advisories that say an unauthenticated crawl cannot prove cross-account access.Scope (decision from the dispatcher, AC narrowed on #2322): detection covers ids in URL paths and query strings of discovered endpoints. Ids inside JSON response bodies are out of scope: site rules do not receive fetched bodies, and reading them would need a new request or collector, so the rule stays passive. JSON id fields in inline page data are tracked in #2369. The docs page says so.
The live rule count crosses 360, so
PUBLIC_RULE_COUNT_FLOORand every "350+" copy are bumped to 360+. The private repo's website copy needs the same floor.Commands run:
bun run scripts/test-suites.ts --run rules(12993 pass, 0 fail)bun run scripts/test-suites.ts --run rest(3968 pass, 0 fail)bun test ./packages/audit-engine/tests/streaming-rules-canonical-golden.test.ts(1 pass); golden-finding-messages-229 (3 pass, no snapshot diff)bun run typecheckin packages/rules,make validatein docs,bun scripts/changelog.ts check,oxlinton the new filesDocs: docs/rules/security/sequential-resource-ids.mdx, hub, docs.json, counts. Skill: none.
Closes #2322