Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out API lints according to pgrst.db_schemas #71

Merged
merged 2 commits into from
May 8, 2024

Conversation

olirice
Copy link
Collaborator

@olirice olirice commented May 8, 2024

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 supabase/supabase#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

  • reduces the false positive rate
  • allows Supabase users who do not use APIs to clear these lints by emptying their API search path setting

@olirice olirice changed the title Filter out API lints according to pgrst.db_schemas Filter out API lints according to pgrst.db_schemas May 8, 2024
@olirice olirice merged commit e2a6622 into main May 8, 2024
2 checks passed
@olirice olirice deleted the or/check-pgrst-db_schemas branch May 8, 2024 18:40
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