Repository navigation
feat(auth): add Gmail read-send scope - #1033
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 7:48 PM ET / 23:48 UTC. ClawSweeper reviewWhat this changesAdds Gmail Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain This PR adds a still-missing least-privilege Gmail authorization mode. The implementation is focused and the follow-up hardening is sound, but real OAuth behavior proof remains required before merge. Priority: P2 Review scores
Verification
How this fits togetherThe auth command turns service and scope flags into a Google OAuth consent request, then records token metadata for recovery and reauthorization. Those scopes determine what Gmail operations the CLI can perform. flowchart LR
A[Auth command] --> B[Scope preset]
B --> C[OAuth request]
C --> D[Google consent]
D --> E[Stored token]
E --> F[Reauthorization]
F --> G[Gmail access]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the explicit scope presets only after redacted live Google consent and reauthorization evidence confirms the requested limited scopes and successful recovery path. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction; the outstanding need is a real after-fix OAuth authorization and reauthorization demonstration, not another mocked test. Is this the best way to solve the issue? Yes, conditionally: the preset and exact-scope approach is narrow and covered in source, but live OAuth proof is needed to validate its authorization-boundary claim. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4f4216bafd6c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Landed as c1a4191 after preserving the contributor commit and tightening the proposed scope boundary. Verification:
A completed live consent/send cannot be demonstrated with the current test token because Google granted it only |
Upstream openclaw#1033 added --gmail-scope send and read-send. read-send is the right grant for an account served with --allow-send: read and send without full mailbox modify. Also note that any narrowed scope disables incremental authorization, so a re-consent must name every service it wants. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KPDVDx9x2HsmoxjrYMRU3Y
Summary
--gmail-scope read-sendrequesting exactly Gmail readonly + send accessfullandreadonlybehaviorWhy
Clients that search and send mail should not need Gmail modify/settings permissions. This preset provides least-privilege read-and-send authorization and ensures reauthorization does not silently retain broader prior grants.
Tests
make ciUser-facing changes
gog auth add --services gmail --gmail-scope read-sendnow requests Gmail read and send access without Gmail modify/settings scopes.