Repository navigation
docs(security): an OAuth callback with no session trusts only its signed state - #3446
Open
lilyshen0722 wants to merge 2 commits into
Open
lilyshen0722 wants to merge 2 commits into
lilyshen0722 wants to merge 2 commits into
Conversation
The pattern behind #3436: sign the state server-side with the user and resource, refuse anything else before the code exchange, bind what the callback hands back to that user, and still check authority over the resource at the write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDs9DT6tbhKm6UhsmFhLk9
…den the header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDs9DT6tbhKm6UhsmFhLk9
lilyshen0722
commented
Nov 4, 2026
lilyshen0722
left a comment
Contributor
Author
There was a problem hiding this comment.
Review at dd9b583. One subagent review (Sonnet), tier 0, docs only.
- Code claims: every one matches the code as merged in #3436:
- the purpose claims (
discord-install-stateanddiscord-install), with noidoruserclaim in either, so neither reads as a session; - install-link mints only after
canManagePod; - the callback refuses a bad state before the token exchange;
- the user-bound proof is checked at
/channelsand athasDiscordGuildAuthority; - the creator-or-admin check on bind runs before the guild check.
- the purpose claims (
- Anchor: the quick-reference anchor resolves to the new heading.
- Infra and ids: no infra identifiers and no internal ledger ids.
- Nits from the review, all fixed in the second commit:
- the order of the sources list;
- the summary-exposure line now cites
discordCommandService.handleSummaryCommand; - the file header now covers authorization shapes.
GATE: PASS
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords: 1
Please check the settings in the CodeRabbit UI or the
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 4, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 4, 2026
This branch has not been deployed
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.
This adds one section to
docs/security-patterns.mdon what an OAuth callback that arrives with no session may trust. The short answer is itsstate, and only when the server signed that state with the user and the resource. The pattern comes from #3436, the Discord install, which is live.The section covers:
codepaired with the victim's resource id;Also in this change:
Tier 0, docs only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MDs9DT6tbhKm6UhsmFhLk9