Skip to content

Fix unauthenticated astro-numerology Groq cost abuse and cache IDOR - #56

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-b478
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-b478

Conversation

@cursor

@cursor cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

What changed

  • Require a matching Firebase Bearer token on POST /api/astro-numerology/analysis and POST /api/vedic-astro-numerology/analysis. Unauthenticated callers can no longer burn Groq credits or read/write another user's Admin cache.
  • Move generation into in-process helpers so profile/on-demand generation still works without HTTP-looping an unauthenticated public route.
  • Send Authorization from the Western and Vedic astro-numerology tool tabs.

Why this change is safe

Verification

  • pnpm exec eslint on touched files (0 errors)
  • pnpm test — 71 suites / 389 tests passed
  • pnpm run security passed
  • Playwright smoke (not required; no routing/landing/auth-page change)

Regression prevention

  • Added tests/integration/astro-numerology-analysis-auth.test.ts and tests/integration/vedic-astro-numerology-analysis-auth.test.ts (401 missing/invalid token, 403 mismatched userId, 200 owned uid).
  • Orchestrator still generates these tools in-process after the HTTP gate.

Release checklist (solo-friendly)

  • CI is green:
    • CI / Lint + Jest
    • CI / Playwright smoke
  • Ready to merge to main.
  • Post-merge: confirm signed-in astro-numerology tabs still load, and unauthenticated POSTs return 401.
Open in Web View Automation 

Unauthenticated POSTs to /api/astro-numerology/analysis and
/api/vedic-astro-numerology/analysis could burn Groq credits and
read/write Admin cache under an attacker-chosen userId. Gate both
routes on a matching Firebase token, generate in-process for the
orchestrator, and send Bearer tokens from the tool tabs.

Co-authored-by: Andy Oliver Rozario <andyrozario7@gmail.com>
@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
future-seer Ready Ready Preview Aug 23, 2026 11:15am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant