fix(security): require internal API key for copilot training endpoints#4311
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Unauthorized requests now consistently return Reviewed by Cursor Bugbot for commit ff4a008. Configure here. |
Greptile SummaryThis PR hardens two internal-only copilot training endpoints ( Confidence Score: 5/5Safe to merge — minimal, targeted security hardening with no regressions. Both routes now use the existing No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(security): require internal API key ..." | Re-trigger Greptile |
Summary
/api/copilot/trainingand/api/copilot/training/examplespreviously accepted any authenticated session, letting any user inject arbitrary data into the global agent indexerINTERNAL_API_SECRETvia thex-api-keyheader (existingcheckInternalApiKeyhelper) — no in-app callers exist, these are internal-only endpointsType of Change
Testing
Tested manually; typecheck clean
Checklist