fix(ui/security): close P2 vulnerabilities — JWT fail-closed, path redaction, identity hardening - #976
Conversation
…daction, identity hardening - Fix isBootJwtExpired: treat missing exp claim as expired (fail-closed) instead of treating as valid forever (fail-open) - Redact absolute filesystem paths from /api/audit/summary responses — return only filenames via path.basename() - Remove x-owner-id header fallback in /api/health/ingest-smoke — identity must come from boot user only, never from request headers Addresses P2 findings #8, #9, #10 from UI security review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
Summary
isBootJwtExpiredfail-open: JWTs withoutexpclaim now treated as expired (fail-closed security posture)/api/audit/summarynow returns only filenames viapath.basename()instead of full absolute pathsx-owner-idfallback:/api/health/ingest-smokeidentity comes from boot user only, never from request headersP2 Findings Addressed
isBootJwtExpiredreturns false for no-exp JWTlib/supabaseClient.ts/api/audit/summaryreturns absolute filesystem pathsapp/api/audit/summary/route.ts/api/health/ingest-smokeacceptsx-owner-idheaderapp/api/health/ingest-smoke/route.tsTest plan
npm run typecheckpasses (confirmed)expclaim is now treated as expired/api/audit/summaryresponse contains only filenames, not paths/api/health/ingest-smokeignoresx-owner-idheader🤖 Generated with Claude Code