-
-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add lint to detect RLS policies that allow access to anonymous users #28
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
base: main
Are you sure you want to change the base?
Conversation
92fd399
to
172f6f2
Compare
f20e755
to
32a0738
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check if a user has enabled anonymous logins from within the database? Currently this lint will fire on almost every project and only a small fraction are likely to enable anonymous logins in the short term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we can merge this we need to get the FE integration updated to not run all lints by default.
Terry is back tomorrow and I'll discuss it with him then but this might get pushed out til the week after LW as everyone is starting to get crunched
'INFO' as level, | ||
'EXTERNAL' as facing, | ||
'Detects row level security (RLS) policies that allow access to anonymous users.' as description, | ||
'https://supabase.github.io/splinter/0012_auth_allow_anonymous_sign_ins' as remediation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change this to a main docs site link please? Following the pattern here: https://supabase.com/docs/guides/database/database-advisors
blocked on deciding how we can run lints conditionally on the platform - currently, there's no way to conditionally execute a lint from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
authenticated
,public
, or any other role membersauth.jwt()->>'is_anonymous'
expression in the policy definitionAdditional context
Add any other context or screenshots.