Repository navigation
fix(rules): one request and one finding per endpoint across unauthenticated-api and auth-endpoint-disclosure (#1886) - #2080
Merged
Merged
Conversation
…icated-api and auth-endpoint-disclosure; auth rule never passes on throttle, challenge, 5xx or no candidates (#1886) Signed-off-by: Nik Cubrilovic <[email protected]>
…rule deferred to it after a 429 or challenge (#1886) Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
…ly for endpoints that rule did not leave unread, in either run order (#1886) Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
boat/probe-dedupe-1886
branch
from
November 16, 2026 20:47
f1387e5 to
2d5928d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1886. Depends on #1885 (this branch carries its two commits; after #1885 merges this PR's diff is the one commit d270dbc). Release blocker.
What changes
security/unauthenticated-apiandsecurity/auth-endpoint-disclosuresend the same anonymous GET (no cookie, no Authorization, no query, no redirect).probe-http.tsnow hassendAnonymousGet, memoized on the audit's probe budget (aWeakMap, so two audits never share an answer): the first rule spends one quiet probe, the second reads the same answer at no cost.buildApiProbe/buildAuthProbeboth returnbuildAnonymousGet(the auth rule'sAcceptis nowapplication/json, */*;q=0.1, the unauthenticated-api value).deferredToAuthin its pass details). Otherwise it reports as before. If auth-endpoint-disclosure is disabled (ctx.ruleEnabled), nothing is deferred. The decision is a pure function of the shared answer, so rule order does not matter (tested both orders).probe-incomplete), a 429/challenge stops the run, and no probeable candidate isno-endpointsskipped instead of a pass. A budget refusal no longer ends the loop, so an endpoint another rule already fetched is still read.Acceptance criteria
probe-dedupe-1886.test.ts(both orders) and the engine e2eauth-endpoint-dedupe-1886-e2e.test.ts(v1 and v2, real crawl from an inlinefetch("/api/me")).GET /api/me./api/methat leaks a user record asserts one finding and one request: same tests.no-endpointsskipped, not a pass (release gate).Gates
rules + audit-engine typecheck clean; tests above;
make validatein docs (62/62). Docs: both rule pages; CHANGELOG under Fixed. DCO signed.Agent skill: no change needed.