Access control
SECURITY DEFINER function without a fixed search_pathaccess.supabase-definer-search-path
A SECURITY DEFINER function runs with its owner's privileges (usually bypassing RLS). Without `set search_path`, a caller who can create objects in a schema on the path can make it run their code with those privileges.
- In force Rule access.supabase-definer-search-path
- 3 clauses
At a glance
| Severity | medium |
|---|---|
| Certainty | Observed — the code as written is the problem |
| Looks at | your source code |
| When it runs | Runs on every scan |
How to fix it
Add `set search_path = ''` (and schema-qualify every table, e.g. `public.profiles`), or make it SECURITY INVOKER if it does not need elevated rights.
Check your own app
Run npx scanlyfix scan in your project. Every finding gets an id; after fixing, npx scanlyfix verify <id> proves it is gone.
If it is a false positive in your project, silence that one line with // scanlyfix-ignore-next-line access.supabase-definer-search-path -- <why>.
Your code stays
on your machine
Only findings are uploaded, and only to your own dashboard.
ScanlyFix
Security, privacy pages, SEO and AI visibility checked in one scan, with fixes your AI editor can apply.
Home