fix(security): use constant-time comparison for OAuth state and clean up renderer#26
Merged
fix(security): use constant-time comparison for OAuth state and clean up renderer#26
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… up renderer - Use crypto/subtle.ConstantTimeCompare for CSRF state validation to prevent timing attacks - Remove dead lastContent field from FlowRenderer (written but never read) - Extract ANSI escape sequences into named constants - Remove unnecessary local copies of headerLines field Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
!=withcrypto/subtle.ConstantTimeComparefor OAuth CSRF state validation in the callback handler, preventing timing attackslastContentfield fromFlowRenderer, extract scattered ANSI escape sequences into named constants, and eliminate unnecessary local variable copiesTest plan
make test— all tests pass (includingTestCallbackServer_StateMismatch)make lint— zero issuesmake fmt— no formatting changes needed🤖 Generated with Claude Code