fix(auth): add PKCE to installed-app OAuth#725
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 10, 2026, 3:18 AM ET / 07:18 UTC. Summary Reproducibility: yes. from source inspection: current main calls AuthCodeURL and Exchange without PKCE options in the installed-app OAuth paths. I did not establish a live failing Google-provider reproduction in this review. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land PKCE for all installed-app OAuth entry points after maintainers either explicitly accept and document the manual fail-closed upgrade behavior or revise it to preserve a supported compatibility path, with redacted live Google OAuth proof attached. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main calls AuthCodeURL and Exchange without PKCE options in the installed-app OAuth paths. I did not establish a live failing Google-provider reproduction in this review. Is this the best way to solve the issue? Unclear: PKCE is the right security direction, but this PR's unconditional manual-code fail-closed behavior needs maintainer policy acceptance or a narrower compatibility plan before it is the best merge path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against b34e3033913a. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
d778ddb to
36653b3
Compare
36653b3 to
e4aef4d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Sanitized proof for this PR:
go test -v ./internal/googleauth -run 'TestAuthorize_ServerFlow_Success|TestManualAuthURL_UsesPKCEAndPersistsVerifier|TestAuthorize_Manual_AuthURL_UsesStoredPKCEVerifier' -count=1
This verifies the installed-app OAuth URL includes an S256 PKCE challenge, keeps the verifier out of the browser URL, and completes the callback/exchange path with the verifier. |
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
Summary
Fixes #693.
Compatibility note
Manual authorization-code exchange now requires a current gog-generated state/verifier pair. Stale pre-PKCE manual state and bare raw-code exchanges without a matching verifier fail instead of falling back to a non-PKCE exchange; that is intentional because PKCE binds the code exchange to the original authorization request.
Validation
Proof
Local tests verify auth URLs include code_challenge/code_challenge_method=S256, do not expose code_verifier, and token exchange sends the verifier. I did not run a live Google OAuth browser flow in this environment.