feat(cloud-agent): commit as yourself instead of the Kilo bot#3638
Conversation
Code Review SummaryStatus: 2 Observations (Non-blocking) | Recommendation: Merge Executive SummaryThis is a large feature PR adding user-attributed Cloud Agent actions (personal GitHub OAuth, commit co-authorship, identity hints). The security and correctness posture is strong. Two minor issues found — neither blocks merge. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Carried-forward issue (deferred)
New files reviewed in this pass
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-4.6 · 4,897,645 tokens Review guidance: REVIEW.md from base branch |
4c663ac to
0d905fb
Compare
jeanduplessis
left a comment
There was a problem hiding this comment.
Reviewed the final combined diff. Solid security posture overall: the webhook signature is verified before the new github_app_authorization revocation branch, timingSafeEqual guards the length/empty-secret bypass, the AAD-bound RSA-AES envelope matches exactly between Web encrypt and Worker decrypt/refresh, both unique indexes back the upsert, the co-author hook + auto-commit trailer are idempotent, and GDPR soft-delete now covers user_github_app_tokens with a test.
One concrete edge-case bug (inline): disconnecting an authorization with expired/dead tokens returns 502 permanently and never removes the local row, leaving the user unable to disconnect or reconnect.
Two non-blocking suggestions:
refreshAuthorizationForDisconnectduplicates ~50 lines ofrefreshAuthorization(already acknowledged/deferred — fine to leave).sanitizeGitOutputis duplicated across thesrcandwrapperbundles and can silently drift if a new credential-username scheme is added to only one regex; consider sharing it.
31794b6 to
8e634a6
Compare
Summary
git-token-service: Web encrypts new authorizations with a public-key envelope, while the Worker owns private-key decryption, refresh, disconnect, revocation, and serialized token mutation.Verification
Visual Changes
Tip when you pick a repo and personal account is not connected
Integration
Bot is a co-author