feat(db): strengthen RLS advisory message for stronger agent compliance#5107
Merged
myerekapan merged 1 commit intoApr 20, 2026
Merged
Conversation
Coverage Report for CI Build 24677604488Warning No base build found for commit Coverage: 63.667%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
jgoux
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tightens the wording of the RLS advisory injected into
supabase db queryagent-mode responses. Mirrors the matching change on the MCP side in supabase-community/supabase-mcp#251 so the two surfaces stay consistent.Why
Testing feedback on the MCP PR (Cursor with "auto" model) showed that the original wording was being treated as a light warning — the agent would mention RLS in passing but not prompt the user to fix it, which is the core intent of GROWTH-712. The previous message was descriptive ("Without RLS, these tables are accessible to any role...") but contained no directive to the agent about what to do.
What changed
Only the
Messagefield incheckRLSAdvisory. Three deliberate shifts:"have RLS disabled"instead of"do not have RLS enabled""anyone with the anon key can read or modify every row"instead of the abstract"accessible to any role with table privileges""You MUST surface this security issue to the user"and"Do not auto-apply the remediation SQL: enabling RLS without policies will block all access"— the second guards against agents silently running the remediation and locking the tableSchema, priority, level, remediation SQL, and filtering logic are unchanged.
Test plan
go test ./internal/db/query/...passes locallyassert.Containsassertions on"N table(s)"and table names still hold