fix(api): restrict approval decisions to server auth - #3350
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-05 04:40:12 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3350 +/- ##
=======================================
Coverage 94.14% 94.14%
=======================================
Files 276 276
Lines 30246 30246
Branches 11021 11021
=======================================
Hits 28474 28474
Misses 1127 1127
Partials 645 645
🚀 New features to boost your workflow:
|
Motivation
/accept//reject) which opened a CSRF-exploitable path by coarse allowlisting the whole pending-actions family.Description
isRepoAgentPendingActionsPathregex insrc/api/routes.tsso it matches only the read-only list endpoint (/v1/repos/:owner/:repo/agent/pending-actions) and no longer admits/:id/acceptor/:id/rejectfor session auth.test/unit/routes-agent-approval.test.tsasserting that a repository-owner browser session receives403and does not execute an approval POST, leaving the queued action pending.Testing
npx vitest run test/unit/routes-agent-approval.test.ts test/unit/access-boundary.test.tsand both suites passed.npm run ui:openapi:checkwhich succeeded to confirm OpenAPI parity.npm run test:coveragebut the local unsharded run could not be completed in this environment due to long-running suites/timeouts, so a complete coverage report was not produced here.Codex Task