Skip to content

add public bucket listing lint#152

Open
dnywh wants to merge 2 commits intomainfrom
dnywh/public-bucket-allows-listing-lint
Open

add public bucket listing lint#152
dnywh wants to merge 2 commits intomainfrom
dnywh/public-bucket-allows-listing-lint

Conversation

@dnywh
Copy link
Copy Markdown
Contributor

@dnywh dnywh commented Apr 8, 2026

Summary

  • add a new 0025_public_bucket_allows_listing security lint for public storage buckets that also have bucket-scoped SELECT policies on storage.objects
  • include bucket and policy metadata so Studio can render affected buckets cleanly and support future per-resource handling
  • add lint docs, regression coverage, unionability updates, and regenerate splinter.sql

Why

This moves the public-bucket listing warning into Splinter as the source of truth rather than keeping it as a client-side-only signal in supabase/supabase.

The lint is intentionally narrow: it does not warn on public buckets in general. It only warns when a public bucket also has one or more matching SELECT policies that make its contents listable.

Validation

  • docker rmi -f dockerfiles-test && SUPABASE_VERSION=15.1.1.13 docker-compose -f dockerfiles/docker-compose.yml run --rm test
  • pre-commit hooks during commit

Copy link
Copy Markdown

@kemaldotearth kemaldotearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this as it works locally.

name: Compile SQL Files
entry: python bin/compile.py
language: system
language: python
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t let me commit otherwise.

With language: python, pre-commit creates a virtualenv for the hook and runs it with a managed Python binary — no dependency on system python or python3, works the same on macOS, Linux, and Windows.

@dnywh dnywh marked this pull request as ready for review April 10, 2026 06:12
@kemaldotearth kemaldotearth requested a review from olirice April 10, 2026 08:52
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.

2 participants