[Feature Request] AST-based Static RLS Linter & Hybrid Search Plugin Engine for supabase db lint
@7ttp がすでに取り組んでいます。
2026年8月3日 から。
評価
この issue はまだ評価されていません。
説明
Existing issues
- I have searched the existing issues.
Affected area
Database
Problem to solve
While building on Supabase, we noticed a few tricky Row Level Security (RLS) and database bugs that can easily slip past normal checks into production:
- Infinite RLS Policy Loops: Self-referencing subqueries inside USING clauses that cause
stack depth limit exceededcrashes when executed. - Unindexed FK Joins in Policies: Policy subqueries that join on foreign key columns missing database indexes, leading to full table scans on every request.
- Insecure SECURITY DEFINER RPC Functions: Functions created without an explicit
SET search_path = ''scoping, leaving room for schema hijacking.
Detecting these early without spinning up full local database containers every time can save developers a lot of debugging headache.
Proposed solution
We built a lightweight, zero-dependency AST static analyzer (supabase-rls-guardian & supabase-vector-sdk) that parses migration files and catches these rules in under 5ms without needing a live database daemon running.
We'd love to propose:
- Bringing these static RLS analysis rules directly into
supabase db lint. - Adding a
--htmldashboard option so teams can publish visual security audit artifacts in their CI workflows. - Including built-in SQL generators for Reciprocal Rank Fusion (RRF) hybrid search (
match_documents_hybrid).
Everything has 100% test coverage, and we'd be super happy to open a clean Pull Request to contribute this directly to the Supabase CLI!
Alternatives considered
Relying on manual testing or spinning up full Docker containers for every quick lint check, which is usually much slower and harder to run inside lightweight GitHub Action PR checks.
Additional context
We published an open-source reference implementation and benchmark suite here:
- GitHub: https://github.com/supabase-community/rls-guardian
- npm:
supabase-rls-guardian
Happy to adapt the code to fit whatever patterns the CLI team prefers!
- 主要言語
- TypeScript
- スター
- 2.4k
- フォーク
- 523
- 平均マージ
- 20時間 47分
- マージ済み PR(30日)
- 243
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
supabase/cli のほかの issue
-
🐛 Bug supabase/cli
-
🐛 Bug supabase/cli
-
🐛 Bug supabase/cli
-
Local Kong keeps idle upstream connections longer than PostgREST, causing sporadic 502 on POST/PATCH オープン🐛 Bug supabase/cli
-
✨ Feature supabase/cli
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·