supabase / splinter

Supabase Postgres Linter
https://supabase.github.io/splinter/
68 stars 6 forks source link

Filter out API lints according to `pgrst.db_schemas` #71

Closed olirice closed 2 months ago

olirice commented 2 months ago

What kind of change does this PR introduce?

Several lints check if certain insecure object types are exposed publicly over APIs.

Historically, we have only used permissions of the anon and authenticated roles to determine if an object should be linted. We should also consider if the object is on the API's search path pgrst.db_schemas but that value was not available in the database.

Now that https://github.com/supabase/supabase/pull/25784 has merged, we can reference pgrst.db_schemas. This PR updates the relevant API lints to filter out entities that aren't on that API search path

This change