- Home
- Skills
- Data & Databases
- db security auditor
More screenshots
Works with the AI Agents you already use
db security auditor
Professional database security auditor providing evidence-based vulnerability reports and remediation SQL.
$5.90
db security auditor
Example session with this skill installed
Audit these files for security: a schema.sql with user tables and a db.py file using raw cursor execution for logins. Determine if our tenant isolation is valid.
- Read your context and instructions
- Compiled the db security auditor
I have completed the security audit of schema.sql and db.py. The scan identified one CRITICAL injection vulnerability and one HIGH risk regarding tenant isolation.
Security Audit Report
Findings Summary
| Severity | Count | Category |
|---|---|---|
| 🔴 CRITICAL | 1 | SQL Injection |
| 🟠 HIGH | 1 | Tenant Isolation |
| 🟡 MEDIUM | 0 | - |
| 🔵 LOW | 1 | Hardening |
Finding Cards
[CRITICAL] SQL Injection in Login Flow
- Evidence:
db.py:22->cursor.execute(f"SELECT * FROM users WHERE email = '{email}'") - Risk: An attacker can bypass authentication by injecting
' OR '1'='1into the email field. - Exploitability: High. Direct string interpolation of user input.
[HIGH] Missing Tenant Isolation
Evidence: schema.sql lacks Row Level Security (RLS) policies on the orders table despite multi-tenant requirements.
- Risk: Cross-tenant data leakage if the application layer fails to append a
tenant_idfilter. - Confidence: High.
Checklist Diff
- [FAIL] Parameterized Queries: String interpolation found in
db.py. - [FAIL] Row Level Security: No
ALTER TABLE ... ENABLE ROW LEVEL SECURITYdetected. - [PASS] Secret Management: No plaintext passwords found in
schema.sql. - [N/A] Backup Policy: No migration or backup config files provided.
Risk Score: 8.5/10
The score reflects a direct authentication bypass vulnerability.
Remediation Pack
Fix 1: Parameterize Login Query
# Before
cursor.execute(f"SELECT * FROM users WHERE email = '{email}'")
# After
cursor.execute("SELECT * FROM users WHERE email = %s", (email,))
Fix 2: Enable RLS
-- Before
-- (Table exists without protection)
-- After
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY tenant_isolation_policy ON orders
USING (tenant_id = current_setting('app.current_tenant_id')::uuid);
Next steps
- Apply the parameterized query fix in
db.pyimmediately to prevent auth bypass. - Implement RLS on all tenant-specific tables in
schema.sql. - Provide
grants.sqlto audit database user permissions.
Connects securely to your tools. The creator never sees your data.
About this skill
Database security is often an afterthought until a breach occurs. This skill provides a rigorous, six-pass security audit of your database layer to identify vulnerabilities before they reach production. It analyzes schema SQL, migrations, query code, and connection configurations to find structural and logic flaws that standard linters miss.
What it does
- Injection analysis scans for SQLi, unsafe ORM escape hatches, and NoSQL operator injection across all query paths.
- Privilege auditing reviews role hierarchies, least-privilege violations, and potential escalation paths in grants and DDL.
- Exposure detection identifies PII hygiene issues, missing RLS, tenant isolation failures, and plaintext secrets in config.
- Risk scoring calculates a 0–10 severity rating based on exploitability and confidence for every finding.
- Remediation generation provides specific SQL and code patches for CRITICAL and HIGH findings without modifying your source.
How it works
- Scope Contract defines the engine version, materials provided, and explicitly lists missing data points.
- Multi-Pass Scan executes sequential audits for injection, privileges, data exposure, and logging.
- Findings Report delivers a severity-rated table, evidence-backed finding cards, and a checklist diff.
- Remediation Pack provides before/after snippets and prioritized fixes for the most urgent risks.
Frameworks & tools
Works with any SQL engine (Postgres, MySQL, SQL Server) and common ORMs. Handles raw SQL, migration files, .env configurations, and backend query code in Python, JavaScript, or PHP.
Why this beats prompting it yourself
Generic prompts often hallucinate vulnerabilities or miss subtle isolation failures like RLS bypasses. This skill uses a gated workflow that demands evidence for every claim and forces an honest assessment of what it couldn't see due to missing files.
Use cases
- Reviewing an inherited legacy codebase for hidden backdoors or hardcoded credentials.
- Auditing new migrations and schema changes during the PR process for PII exposure.
- Verifying multi-tenant isolation logic before a SaaS product launch.
- Triage of SQL injection surfaces in projects using raw database drivers.
Known limitations
Cannot audit network-level infrastructure or application-layer auth logic. Requires DDL or query code to be useful; it cannot scan a live database via connection string.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Requires provided schema, query, or config files. Cannot audit network infra or app auth. Reports are technical assessments, not legal compliance opinions.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago