Skip to content

Protect PDF ingestion with authenticated sessions - #35

Merged
shriyahehe merged 4 commits into
mainfrom
security/protect-pdf-ingestion
Dec 4, 2026
Merged

shriyahehe merged 4 commits into
mainfrom
security/protect-pdf-ingestion

Conversation

@shriyahehe

Copy link
Copy Markdown
Owner

Security hardening: authenticated PDF ingestion

Change

  • Require a valid Supabase-authenticated session before the PDF ingestion endpoint accepts uploads.
  • Update the frontend PDF upload helper to send the existing Supabase access token through authenticatedApiFetch.
  • Add regression coverage proving unauthenticated uploads receive HTTP 401 while authenticated uploads retain existing PDF validation behavior.

Compatibility and safety

  • Existing signed-in workspace users continue using the same PDF upload route and response shape.
  • PubMed search, paper retrieval, PMC full-text retrieval, AI routes, and database behavior are unchanged.
  • No schema changes, new dependencies, secret changes, or deployment configuration changes.
  • No production deployment was triggered.

Verification

GitHub Actions should run the frontend build and backend tests. Review the results before merging.

Remaining security work

This is one targeted hardening step, not a claim that the application is fully secure. The public PubMed/trend endpoints still need abuse controls, and the current in-memory AI rate limiter is per backend instance. A broader follow-up audit should cover dependency advisories, frontend security headers/CSP, Supabase Auth settings, RLS policies, logging, and production monitoring.

@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
bio-query Canceled Canceled Dec 4, 2026 12:40pm UTC

@shriyahehe
shriyahehe merged commit 04508a4 into main Dec 4, 2026
4 of 5 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 9d45c7b5 Deployed Dec 4, 2026 by vercel[bot]
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