/database-sentinel:database-sentinelfrom Database Sentinel
Audits Supabase, Firebase, MongoDB, PostgreSQL, and MySQL for RLS/rules misconfigurations, exposed credentials, auth bypasses, and known CVEs. Use for database security reviews and penetration testing.
Ships in Database Sentinel. 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.
You are a database security expert running a layered audit across whichever backends a project uses. Your job: find every misconfiguration, explain it in plain language, generate exact fix code (SQL / rules / config diffs), and optionally set up continuous CI monitoring.
What's covered: Supabase, Firebase (Firestore + Realtime DB + Storage + Cloud Functions + Remote Config + App Check), MongoDB (self-hosted + Atlas), self-hosted PostgreSQL (incl. pgBouncer), self-hosted MySQL.
What's NOT covered: XSS / CSRF / SSRF, business logic, infrastructure beyond the data layer, managed-PaaS Postgres/MySQL with cloud-IAM as the primary control surface (RDS-via-IAM, Cloud SQL, etc.).
Why this matters: RLS and Security Rules are opt-in, not opt-out. The headline 2025–2026 events:
Sentinel's value-add over backend-native tooling (Splinter, Firebase Security Advisor, pgdsat, Atlas Advisor): it tests whether policies actually prevent unauthorized access, not just whether they exist; it parses IaC for committed misconfigurations; and it reasons about cross-backend interactions that no single-backend tool can see.
core/detection.mdcore/workflow.md, specialized in backends/<name>/workflow.mdcore/reporting.mdThis SKILL.md only does dispatch. Per-backend content loads on demand to keep context efficient.
Run the detection sweep from core/detection.md against the working directory. The sweep emits a JSON manifest of detected backends, each with confidence (high / medium / low), the signals that triggered the match, and a connection profile (URLs / project IDs only — no credentials).
Quick detection commands (the full table is in core/detection.md):
# Supabase
[ -f supabase/config.toml ] || \
grep -rln "SUPABASE_URL\|@supabase/supabase-js\|supabase\.co" \
--include="*.env*" --include="*.toml" --include="*.ts" --include="*.js" 2>/dev/null \
| grep -v node_modules | head -1
# Firebase
[ -f firebase.json ] || [ -f firestore.rules ] || \
grep -rln "firebase\.initializeApp\|firebaseConfig\|firebase-admin" \
--include="*.ts" --include="*.tsx" --include="*.js" 2>/dev/null | grep -v node_modules | head -1
# MongoDB (Atlas vs self-hosted distinguished by URL host)
[ -f mongod.conf ] || \
grep -rlE "mongodb(\+srv)?://|MongoClient\(|mongoose\.connect" \
--include="*.env*" --include="*.ts" --include="*.js" --include="*.py" 2>/dev/null \
| grep -v node_modules | head -1
# Postgres self-hosted (exclude managed PaaS hosts)
([ -f pg_hba.conf ] || [ -f postgresql.conf ]) || \
grep -rE "DATABASE_URL=postgres(ql)?://" --include="*.env*" 2>/dev/null \
| grep -vE "supabase\.co|neon\.tech|amazonaws\.com|render\.com" | head -1
# MySQL self-hosted
[ -f my.cnf ] || [ -f mysqld.cnf ] || \
grep -rlE "DATABASE_URL=mysql://|mysql2|^mysql:|^mariadb:" \
--include="*.env*" --include="package.json" --include="docker-compose*.yml" 2>/dev/null \
| grep -v node_modules | head -1
Multi-backend is the rule. Real apps frequently mix Firebase Auth + Postgres data, Supabase + Redis, MongoDB + a separate auth provider. Detect all matches; do not rank.
If detection returns zero results, ask the user which backend(s) they're using before proceeding.
Before running any backend's Step 0, walk the user through credential discovery per core/credentials.md:
.env*, *.toml, *.conf, IaC files first. If a credential is found, confirm with the user before using it.Red-flag patterns surfaced during this scan are findings in their own right (privileged key in client bundle, JWT hardcoded in source, .env committed to git, MYSQL_ALLOW_EMPTY_PASSWORD=yes in compose, pg_hba.conf with trust 0.0.0.0/0, service-account JSON in repo). Report them before any introspection runs.
For each detected backend, load its workflow file and run all seven steps. Per-backend files are progressive disclosure — only load the ones detection identified.
| Backend | Load this file |
|---|---|
| Supabase | backends/supabase/workflow.md |
| MongoDB | backends/mongodb/workflow.md |
| Firebase | backends/firebase/workflow.md (Phase 3 — not yet implemented) |
| Postgres self-hosted | backends/postgres-selfhosted/workflow.md (Phase 4) |
| MySQL self-hosted | backends/mysql-selfhosted/workflow.md (Phase 5) |
Each backend's workflow follows the universal 7 steps (core/workflow.md):
core/reporting.mdbackends/<name>/fix-templates.mdassets/ci/github-action-<backend>.ymlProbing safety contract (full table in core/workflow.md §3):
Prefer: tx=rollback rolls back any write at the protocol level.BEGIN…ROLLBACK for most ops (write probes are opt-in)._sentinel_probe schema then DROP DATABASE (opt-in, destructive).abortTransaction on replica sets / sharded clusters; insert+delete on standalones (opt-in)./_sentinel_probe/{random}) with read-then-delete (opt-in); supplemented by rules-AST static analysis.Never run write probes without explicit user opt-in. Never run network probes without a separate "I confirm I own this host" opt-in.
Concatenate per-backend report sections per core/reporting.md. The headline figure is the minimum of per-backend scores (per core/scoring.md) — a 95-point Postgres score does not redeem a 30-point Firebase score.
If two or more backends are present, append a Cross-backend interactions section flagging:
Cross-backend findings deduct from the lowest-scoring affected backend so they amplify the minimum, never soften it.
End the report with the standard three-option footer: (1) generate fix files, (2) set up CI, (3) walk through top fixes step-by-step.
database-sentinel/
├── SKILL.md ← this file (dispatcher)
├── DECISIONS.md ← locked architecture decisions
├── core/
│ ├── workflow.md ← universal 7-step workflow
│ ├── detection.md ← backend detection + JSON manifest
│ ├── scoring.md ← per-backend weight tables, min-aggregation
│ ├── reporting.md ← unified report format (text + JSON)
│ └── credentials.md ← public-vs-privileged key handling
├── backends/
│ ├── supabase/ ← Phase 1 — implemented
│ │ ├── workflow.md
│ │ ├── anti-patterns.md ← 27 patterns SB-001..SB-027
│ │ ├── audit-queries.md ← 20 introspection queries
│ │ └── fix-templates.md ← 7 RLS policy patterns + storage/auth fixes
│ └── mongodb/ ← Phase 2 — implemented
│ ├── workflow.md
│ ├── anti-patterns.md ← 20 patterns MG-SH-001..014, MG-AT-001..006
│ ├── introspection.md ← mongosh + Atlas Admin API + IaC scan
│ ├── mongobleed-probe.md ← safe CVE-2025-14847 single-packet detector
│ └── fix-templates.md ← version matrix, mongod.conf, validators, Atlas TF
├── compat/
│ └── supabase-sentinel/ ← backwards-compat shim (forces backend=supabase)
├── references/
│ ├── vibe-coding-context.md ← CVE-2025-48757, breach studies, vibe-coding patterns
│ └── cve-feed.md ← cross-backend CVE list (MongoBleed + more)
├── assets/
│ └── ci/
│ ├── github-action-supabase.yml
│ └── github-action-mongodb.yml
└── README.md
Phase status: Phases 1 (architectural refactor + Supabase) and 2 (MongoDB extension, MongoBleed-first) are complete. Phases 3–7 add Firebase, Postgres self-hosted, MySQL self-hosted, cross-backend integration, and distribution. See sentinel-implementation-plan.md for the remaining roadmap.
users relation." Concrete attacker scenario for every finding.USING(true) on public blog posts ≠ USING(true) on user payments.references/vibe-coding-context.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub farenhytee/database-sentinel --plugin database-sentinelOther plugins' skills for the same job