security_audit
Audit database security by inspecting roles, privileges, RLS policies, SSL status, and security definer functions. Specify a schema or audit all schemas.
Instructions
Audit roles, privileges, RLS, SSL, and security definer functions.
LEVEL: Schema or Database (schema='all') REQUIRED: Specify schema explicitly - use 'all' for all schemas or a specific schema name.
USE FOR: security audit, role permissions, RLS policies, SSL status. DO NOT USE FOR: PII detection (sensitive_data_scan), data quality.
INCLUDE: all, roles, privileges, rls, ssl, sensitive, functions
Examples: security_audit(schema='sales') - Audit sales schema security_audit(schema='all') - All schemas security_audit(schema='billing', include='roles') - Roles only in billing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema to audit. Omit for all schemas, or specify one. Use get_schema() to list available. | |
| include | No | What to audit | all |
| format | No | Output format | json |
| url | No | Database URL |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |