fix: enforce tracked-repo allowlist on repo-scoped API routes#155
fix: enforce tracked-repo allowlist on repo-scoped API routes#155glorydavid03023 wants to merge 2 commits into
Conversation
Completes allowlist coverage for /api/gt/repos/[owner]/[name]/* so untracked repos cannot trigger SQLite reads or link backfills. Fixes MkDev11#141 Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughTwo API routes under ChangesRepo Allowlist Access Control
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Add assertTrackedRepo to list/meta, badges, validations, author feeds, and related-prs index handlers so untracked owner/name pairs cannot read hub cache data. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Please add screenshots |
Summary
assertTrackedRepoon remaining repo-scoped API routes (issues/pulls lists, meta, badges, validations, author feeds, related-prs index).assertTrackedRepoonGET /api/gt/repos/.../minersand.../prs(partial fix for bug: /api/gt/repos proxy uses privileged PAT with no repo allowlist - authenticated users can read any accessible private repo #141).Test plan
pnpm run lintandpnpm buildGET /api/repos/<owner>/<name>/issuesreturns 200GET /api/gt/repos/<owner>/<name>/minersreturns 200