Proposal: lint for RLS policies whose role lacks the table privilege (policy_without_privilege)
维护者通常 1 天内回复
@larik15 已经在做这个了。
开始于 2026年10月5日。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 1/100
调研方向
The issue describes a tested implementation, but a linked open pull request (#197) already carries the work. Review that PR for the lint, docs, tests, and expected output; the proposed lint is done when its behavior and output match the issue and the test suite passes on the stated PostgreSQL versions.
由索引模型根据 Issue 内容生成。
描述
What the lint catches
A permissive RLS policy for anon or authenticated on a table in an exposed schema, where that role has no table privilege for the policy's command (SELECT/INSERT/UPDATE/DELETE). Postgres checks privileges before RLS, so the policy never takes effect and API requests fail with 42501 permission denied instead of being filtered by the policy. Proposed as an INFO-level lint, 0031_policy_without_privilege.
Why it matters now
Supabase no longer grants anon/authenticated privileges on new public tables automatically: for new projects since 2026-05-30, and for all projects on 2026-10-30 (changelog). A migration that creates a table and its policies but no GRANT now ships a policy that silently does nothing, and none of the existing lints flag a policy that has no effect because the targeted role lacks the table privilege. I searched open and closed issues and PRs in this repo and found nothing covering this.
Status
A tested implementation is ready (lint, docs, tests, expected output). The full suite passes on supabase/postgres 15.14.1.169 and 17.6.1.169. I'll open a PR linking this issue right after filing it. Happy to adjust the approach or renumber if you prefer.
- 主要语言
- PLpgSQL
- 星标
- 284
- 派生
- 110
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
supabase/splinter 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 69/100
supabase/splinter#206 · 1 个 reaction ·
维护者通常 1 天内回复
-
0002_auth_users_exposed false positive: pg_depend join lacks a refclassid filter (cross-catalog OID collision)可能已有人在做 @tushardev-365 于 96 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 40/100
supabase/splinter#210 · 1 个 reaction ·
维护者通常 1 天内回复
-
0030_autovacuum_disabled misses tables where autovacuum_enabled is set to off, 0 or no可能已有人在做 @RaphaelFakhri 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 1 天内回复
-
0028/0029 silently report zero findings for projects using a custom PostgREST request role可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 68/100
维护者通常 1 天内回复
查看 supabase/splinter 的全部 Issue
相似的 Issue
-
Lint rule GV016 order-by-random可能已有人在做 @YinL-k 今天认领。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
laaielichter/Gulliver#20 ·
维护者通常 1 天内回复
-
database documentation from-review-extraction severity:nit
难度 2/5 1-3 小时 新手友好度 70/100
LearningCircuit/local-deep-research#8217 ·
维护者通常 1 天内回复
-
"Sync columns from source" fails on ClickHouse tables with ALIAS, MATERIALIZED or DEFAULT columns可能已有人在做 @bmuraykhi 今天认领。 未关闭#bug
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bazel bug odb
难度 1/5 1 小时以内 新手友好度 80/100
The-OpenROAD-Project/OpenROAD#12095 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
ClickHouse/clickhouse-go#2093 ·
维护者通常 1 天内回复