0002_auth_users_exposed false positive: pg_depend join lacks a refclassid filter (cross-catalog OID collision)
Maintainer thường phản hồi trong vòng 1 ngày
@tushardev-365 đang làm issue này rồi.
Từ ngày 29/7/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu trong lints/0002_auth_users_exposed.sql và kiểm tra phép join pg_depend được mô tả trong issue. Sử dụng truy vấn chẩn đoán từ báo cáo để tái hiện xung đột OID giữa các catalog. Hoàn tất khi lint không còn báo cáo một view có dependency chỉ là đối tượng pg_proc, đồng thời vẫn phát hiện dependency relation trên auth.users.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
lints/0002_auth_users_exposed.sql joins the view's rewrite dependencies to auth.users by OID only:
join pg_catalog.pg_depend d
on d.refobjid = auth_users_pg_class.oid
There is no d.refclassid = 'pg_catalog.pg_class'::regclass predicate, so any pg_depend row from a view's rewrite whose refobjid numerically collides with auth.users' pg_class OID — but actually references an object in a different catalog (pg_proc, pg_type, …) — fires the lint.
Observed instance
On one of our projects, auth.users has pg_class OID 16499, and a public view calls a SECURITY DEFINER helper function whose pg_proc OID is also 16499. The view selects only from public tables (verified: zero relation dependency on auth.users), yet the advisor reports it as CRITICAL auth_users_exposed, and the "action required: security vulnerabilities" email goes out weekly.
Diagnostic query that shows the collision:
with au as (
select oid from pg_class
where relname = 'users' and relnamespace = 'auth'::regnamespace
),
rw as (
select oid from pg_rewrite where ev_class = 'public.<your_view>'::regclass
)
select d.refclassid::regclass as ref_catalog,
case when d.refclassid = 'pg_proc'::regclass then d.refobjid::regprocedure::text
when d.refclassid = 'pg_class'::regclass then d.refobjid::regclass::text
else d.refobjid::text end as ref_object,
d.deptype
from pg_depend d, au, rw
where d.objid = rw.oid and d.refobjid = au.oid;
Result on the affected project: one row, ref_catalog = pg_proc, ref_object = <helper function>(text,uuid) — not a relation.
Suggested fix
Add the catalog filter to the join:
join pg_catalog.pg_depend d
on d.refobjid = auth_users_pg_class.oid
and d.refclassid = 'pg_catalog.pg_class'::regclass
(Other OID-equality joins in the lint suite may want the same audit.)
- Ngôn ngữ chính
- PLpgSQL
- Star
- 284
- Fork
- 110
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của supabase/splinter
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
supabase/splinter#206 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 40/100
supabase/splinter#210 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
0030_autovacuum_disabled misses tables where autovacuum_enabled is set to off, 0 or noCó thể đã có người làm @RaphaelFakhri đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: lint for RLS policies whose role lacks the table privilege (policy_without_privilege)Có thể đã có người làm @larik15 đã nhận 28 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0028/0029 silently report zero findings for projects using a custom PostgREST request roleCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của supabase/splinter
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
--dry-run runs the real operation in ruvector migrate, ruvector backup restore and deployment deployCó thể đã có người làm @tanishqbaweja đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mferretti/SeedStream#443 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Lint rule GV016 order-by-randomCó thể đã có người làm @YinL-k đã nhận hôm nay. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
laaielichter/Gulliver#20 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
database documentation from-review-extraction severity:nit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
LearningCircuit/local-deep-research#8217 ·
Maintainer thường phản hồi trong vòng 1 ngày