fix(consent): send CSRF token on agent auth-request approve/deny#1969
Conversation
ConsentActions used a plain fetch() with no X-CSRF-Token header, so every external-agent access approval/denial (bell notification, toast, and the Decisions app) failed with 'CSRF token missing' on the CSRF-gated approve/deny route. Wrap the fetch init in withCsrf() like AgentKillSwitch does.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughChangesConsent decision request
Estimated code review effort: 2 (Simple) | ~5 minutes Possibly related PRs
✨ Finishing Touches📝 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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by hy3:free · Input: 37.7K · Output: 1.5K · Cached: 97.5K |
ConsentActions used a plain fetch() with no X-CSRF-Token header, so every external-agent access approval/denial (bell notification, toast, Decisions app) failed with 'CSRF token missing'. Wraps the fetch init in withCsrf() like AgentKillSwitch. tsc clean. Unblocks the whole agent consent flow.
Summary by Gitar
DocReviewStorefor tracking document states (awaiting_review,approved,changes_requested) with SQL persistence.project_doc_reviewAPI routes for managing state transitions and actor tracking.ReviewBadgeintoFilesAppto display and cycle review states for project documents._AGENT_DOC_REVIEW_ROUTESallowlist and middleware gating to ensure agents can only access doc-review routes for their scoped projects.test_doc_review.pycovering state transitions, actor recording, and security gating (scoped tokens vs 404/403 scenarios).This will update automatically on new commits.
Summary by CodeRabbit