fix(security): stop leaking Gemini API key to browsers #34
No reviewers
Labels
No labels
agent-context-drift
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rstillwell/deckhearth#34
Loading…
Reference in a new issue
No description provided.
Delete branch "convoy/secure-scanner-gemini-key"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pages/api/config/gemini.js, which returnedGEMINI_AI_API_KEYto any caller without authenticationCameraScanner.jsandOCRSettings.jscheckScanRateLimit(5/min, user-keyed,deckhearth:scan) tolib/rate-limit.jsfor the upcoming/api/scan/identifyrouteforbidden-client-side-llm-keysto prevent reintroducing key leaks or new browser-side LLM URLs (grandfatherslib/ai-ocr.jsuntil convoy #2).convoys/Operator notes
Gemini key rotation is complete (Google AI Studio + Vercel). After merge, redeploy and confirm
GET /api/config/geminireturns 404. Clear browserlocalStoragekeyocrSettingsif it cached the old key.Scanner auto-config is intentionally removed until
server-side-scan-pipelinelands.Test plan
npm run test:run— 21/21forbidden-client-side-llm-keysgrep gate — passcurl/api/config/gemini→ 404Made with Cursor
The latest updates on your projects. Learn more about Vercel for GitHub.
Pipeline Health
Build + CI gates
Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).
Role reports
See individual comments above for details. This rollup updates automatically.
Visual Diff
Screenshots and diffs uploaded as artifacts: view run
If intentional changes: update snapshots locally with
npx playwright test --project=visual --update-snapshotsand commit.