/claude-db:db-security-accessfrom Claude DB
Audits database security: checks Row-Level Security state, PII handling, encryption at-rest and in-transit (TLS/sslmode), and SQL-injection exposure from raw concatenation. Feeds the Design & Integrity score.
Ships in Claude DB. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Security is a Design & Integrity (axis design) concern: a schema can be perfectly normalized and
still leak every row. This module checks who can read/write data and whether the data itself is
protected at rest and in flight. RLS-off on a relied-on multi-tenant/Supabase table and plaintext
secrets/SQL-injection are severity-5 caps.
anon/authenticated role? RLS off on such a
table is severity:5, fail. (Tenant isolation logic lives in M9; M10 owns the on/off state.)card/pan) stored without encryption/tokenization, or logged.text/varchar with no
hashing note, or literal credentials embedded in DDL/migrations/defaults. severity:5.sslmode=disable (or no TLS on a remote
host) is severity:4. Encryption at-rest absence is flagged where statically visible.severity:5, design.Feeds design only (category Seguridad, relational weight 14 shared with M9/M20/M21; analogous Seguridad category in every NoSQL profile).
Parse DDL/migrations/ORM source and connection config: detect text-typed secret columns, literal
credentials (cross-checked against redactSecrets()), sslmode=disable, raw-concat SQL, and
PII-named columns. RLS enablement (ALTER TABLE … ENABLE ROW LEVEL SECURITY) is detectable in
declarative DDL; when RLS state cannot be confirmed from files it is needs_api (never a silent pass).
SELECT c.relname,
c.relrowsecurity AS rls_enabled,
c.relforcerowsecurity AS rls_forced,
(SELECT count(*) FROM pg_policies p WHERE p.tablename = c.relname) AS policy_count
FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE n.nspname = 'public' AND c.relkind = 'r';
Method schema_introspect/constraint_check. A table with rls_enabled = false that holds tenant/
user rows confirms M10.rls.* as established and capping. Runtime-only checks (actual at-rest
encryption, live TLS negotiation) are needs_api at Tier-0.
Emit findings per schema/finding.schema.json. Examples:
M10.tenants.rls_disabled — RLS off on a per-tenant table (severity:5, fail, axis design,
confidence established at Tier-1 / directional from DDL, fixable: proposed).M10.users.password_plaintext — secret stored as text with no hash (severity:5, fail,
established, fixable: advisory).M10.conn.sslmode_disable — sslmode=disable on a remote host (severity:4, warn,
fixable: proposed).M10.repo.sql_string_concat — user input concatenated into SQL (severity:5, fail, directional
from source, fixable: advisory).Each finding: evidence.observed quotes the DDL/connection line/query verbatim with secrets
redacted; verification.reproduce is the catalog query above (referencing $DATABASE_URL) or a
grep for the offending pattern; expected_impact is banded + confidence-tagged (no naked %).
needs_api, never assert it is missing.directional source-only RLS/injection signal never raises the severity-5 cap — confirm via
Tier-1 or generated DDL first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
database-security, access-control, pii, encryption, sql-injection
36 skills in this plugin
/auditAudit a database schema, ORM model, or migrations for design and performance — produces two independent 0-100 scores (Design & Integrity + Performance & Scale) plus a prioritized, evidence-backed report. Read-only; never writes or migrates. Use when the user asks to audit, analyze, review, check, or score a database, schema, data model, migrations, indexes, keys, referential integrity, types, constraints, query patterns, partitioning, or connection pooling — for Postgres, MySQL, Mongo, DynamoDB, Cassandra, pgvector, ClickHouse, Neo4j, and friends./checklistRender a production-readiness GO/NO-GO grid for a database — runs a read-only audit, then maps the findings onto a fixed launch checklist (PITR/backups, RLS on tenant tables, FK indexes, money-as-numeric, timestamptz/UTC, connection pooling sized, migration reversibility, secrets-not-in-schema, charset/utf8mb4). Each row is PASS/WARN/FAIL/NEEDS-LIVE with the finding id, topped by a plain-language verdict. Read-only. Use when the user asks if a database is production-ready, ready to launch/ship, a go/no-go, a pre-launch or readiness checklist, or what to fix before going live./db-antipatternsUnified cross-paradigm anti-pattern catalog (M19) — relational and NoSQL smells that no single structural module owns cleanly: EAV / generic key-value tables, the "god table" with hundreds of columns, comma-separated lists in a column, polymorphic associations without FK, boolean-flag soup, Mongo unbounded array growth, deeply nested documents, the document fan-out / "join in app code" trap, Redis as a relied-on durable primary store. Each finding is re-homed to inherit the natural module's category. Feeds the Design & Integrity AND Performance & Scale scores depending on the smell.npx claudepluginhub hainrixz/claude-db --plugin claude-dbOther plugins' skills for the same job