rls-test-patterns
Installation
SKILL.md
RLS Test Patterns
Comprehensive testing framework for Row Level Security (RLS) policies in Supabase. Catch security vulnerabilities before production with automated tests for user isolation, multi-tenant security, role-based access, and anonymous user restrictions.
Instructions
1. Test User Isolation
Verify users can only access their own data:
# Test user isolation on specific tables
bash scripts/test-user-isolation.sh conversations messages profiles
# Test with specific user IDs
bash scripts/test-user-isolation.sh documents --user1 "uuid1" --user2 "uuid2"
# Generate detailed report
bash scripts/test-user-isolation.sh --all --report isolation-report.md