Skip to content

fix(cookie-bomb-dos): NOT-5xx is the contract, 4xx requirement was ov…#54

Merged
awais786 merged 1 commit into
mainfrom
fix-cookie-bomb-threshold
Jun 1, 2026
Merged

fix(cookie-bomb-dos): NOT-5xx is the contract, 4xx requirement was ov…#54
awais786 merged 1 commit into
mainfrom
fix-cookie-bomb-threshold

Conversation

@awais786

@awais786 awais786 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

…erstrict

PR #52 landed with .toBeGreaterThanOrEqual(400) which fails against the bundle's actual fail-closed behaviour: oauth2-proxy returns 302 to the IDP for unauthenticated visits, and the bomb cookie isn't a real _oauth2_proxy so the user gets bounced — that IS fail-closed for the SSO chain. 6/7 entry points are red in CI on this assertion despite the bundle behaving correctly.

The threat we actually pin is parser-crash (5xx) — a remote- triggerable DoS on any victim with an in-scope cookie write. The status-code shape is the bundle's call (4xx, 3xx-to-IDP, even 2xx when next to a valid cookie). Reverted to NOT-5xx with an expanded inline comment listing the four acceptable shapes (4xx / 3xx-to-IDP / 2xx-when-next-to-valid-cookie / connection-close).

Also renamed the test case from "returns 4xx, not 5xx" to "does not return 5xx" so the name matches the actual assertion.

Verified: 7/7 cookie-bomb-dos pass against live sandbox after the revert. Audit + typecheck clean.

Motivation / Background

This Pull Request has been created because:

  • Resolves #issue-id

Detail

This Pull Request changes:

Additional information

TIP: Provide additional information such as screenshots, benchmarks, reference to other repositories or alternative solutions

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature
  • CHANGELOG files are updated for the behavior change or additional feature (minor bug fixes and documentation changes should not be included)
  • This PR contains API changes and API documentation is updated accordingly (for critical or behavior change, please inform related parties about them).

…erstrict

PR #52 landed with `.toBeGreaterThanOrEqual(400)` which fails against
the bundle's actual fail-closed behaviour: oauth2-proxy returns 302
to the IDP for unauthenticated visits, and the bomb cookie isn't a
real `_oauth2_proxy` so the user gets bounced — that IS fail-closed
for the SSO chain. 6/7 entry points are red in CI on this assertion
despite the bundle behaving correctly.

The threat we actually pin is parser-crash (5xx) — a remote-
triggerable DoS on any victim with an in-scope cookie write. The
status-code shape is the bundle's call (4xx, 3xx-to-IDP, even 2xx
when next to a valid cookie). Reverted to NOT-5xx with an expanded
inline comment listing the four acceptable shapes (4xx / 3xx-to-IDP /
2xx-when-next-to-valid-cookie / connection-close).

Also renamed the test case from "returns 4xx, not 5xx" to "does not
return 5xx" so the name matches the actual assertion.

Verified: 7/7 cookie-bomb-dos pass against live sandbox after the
revert. Audit + typecheck clean.
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

SSO Spec Coverage Audit

Contract source: vendor/openspec/specs/ (snapshot vendored in this repo)

Status Count
✅ Covered (test tag found) 63
⚠️ Deferred (in deferred doc) 25
❌ Missing (no tag, no defer) 0
Total requirements 88

All 88 spec requirements are accounted for.

@awais786 awais786 merged commit 6706789 into main Jun 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant