Agent skill
draconian_rls_audit
Default-Deny security posture for Supabase. Mandates strict RLS and 'WITH CHECK' clauses.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/draconian-rls-audit-cityfish91159-maihouses
SKILL.md
Draconian RLS Audit Protocol
1. Zero Trust (Default-Deny)
- Mandate: Every Table MUST have RLS enabled.
- Policy: The default state of any table should be NO ACCESS. Access is granted explicitly via Policy.
- Detector: Run
SELECT ... WHERE rowsecurity = falseto hunt down naked tables.
2. The "WITH CHECK" Imperative
- Vulnerability: An
INSERTorUPDATEpolicy withoutWITH CHECKallows users to write data they cannot read, or worse, escalate privileges (e.g., "Give myself admin role"). - Rule: ALL modification policies MUST have a
WITH CHECKclause matching theUSINGclause (or stricter).
3. Client-Side Key Ban
- Strict Rule: The string
service_roleMUST NOT exist in any file withinsrc/. - Enforcement: Grep for it. If found, STOP and warn the user.
4. Explicit auth.uid() Binding
- Rule: Policies should almost always bind to
auth.uid(). - Ban: Never hardcode UUIDs or email addresses in SQL policies.
5. Audit Checklist
- RLS enabled?
- Default policy is DENY?
-
WITH CHECKpresent on writes? - No
service_rolein client code?
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?