Repository navigation
fix(web): refuse private repos in the browser merge runner itself - #63
Conversation
The merge panel already hides the browser merge for private repos, but runMergeSteps did not check: a caller could store a plaintext pack for one. It now stops before the worker, the upload or any write. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesMerge guard
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The reachable browser path preserves private-repository visibility, and the runner stops before merge work. No current-head merge risk is indicated. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The runner now stops private-repository merges before uploads or writes. No new exposure was identified, but this client-side check alone does not establish protection for every upload path. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The browser merge now refuses private repositories in
runMergeStepsitself, not only in the merge panel. A private repo's pack has to be encrypted, and the browser merge writes plaintext. Before this change the refusal was UI-only (mergeButton), so any other caller of the runner could have stored a plaintext pack for a private repo.runMergeStepsnow stops withMergeStopped('Private repositories are merged with \dg pr merge` for now.')` before it runs the worker, uploads anything or writes any document. The private-repos work adds an upload-level backstop separately, so both layers hold whichever lands first.Follow-up to #61.
Tests
lib/merge/runner.test.ts: a private-repo run throwsMergeStoppedwith that message and makes no calls at all: no worker, verify, upload, manifest, index, ref or event, and no step events. The test fails when the guard is removed.pnpm typecheck,pnpm lintandvitest run lib/merge/runner.test.ts(13 passed) pass.🤖 Generated with Claude Code
Summary by CodeRabbit
dg pr merge.