Skip to content

fix(security): lock down public data api tables - #38

Merged
hiabhee merged 1 commit into
mainfrom
fix/supabase-public-schema-rls
Nov 11, 2026
Merged

hiabhee merged 1 commit into
mainfrom
fix/supabase-public-schema-rls

Conversation

@hiabhee

@hiabhee hiabhee commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enable RLS on application-owned tables in the exposed public schema.
  • Revoke direct table and sequence privileges from PUBLIC, anon, and authenticated.
  • Remove those grants from future tables and sequences created by the migration role.
  • Leave objects owned by extensions or other roles unchanged. Server-side Prisma retains access as the database owner.

Validation

  • Applied the migration to an isolated temporary PostgreSQL database with representative anon, authenticated, service_role, and extension-owner roles.
  • Confirmed RLS is enabled, anonymous/authenticated privileges are revoked, RLS returns zero rows even after a SELECT grant, server-role access is retained, future public objects receive no API-role grants, and a foreign-owner object is unchanged.
  • npx prisma validate --schema prisma/schema.prisma passed in the main checkout.

The production Supabase project was not modified. Apply this migration, then refresh the Supabase advisors to confirm the findings are cleared.

@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
arch-draw Ready Ready Preview Nov 10, 2026 6:54pm UTC

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d20d12bf-9fdb-4178-86da-1326de497f71
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@hiabhee
hiabhee merged commit aba9306 into main Nov 11, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 89ebfcfa Deployed Nov 10, 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