Agent skill

Scanning Database Security

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Process use when you need to work with security and compliance.

MITAuto-check passedLegal & Compliance

Install Scanning Database Security

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill scanning-database-security -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace scanning-database-security --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/scanning-database-security .claude/skills/scanning-database-security && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scanning-database-security
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
803 words
Files
4 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Process use when you need to work with security and compliance.

  • Works in 10 steps: Check authentication configuration by… → Audit user privileges by querying role… → Scan for default or weak credentials.… → …
  • You need to work with security and compliance
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • With phrases like scan for vulnerabilities

What it does

Scanning Database Security is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with security and compliance. This skill provides security scanning and vulnerability detection with comprehensive guidance and automation. Trigger with phrases like "scan for vulnerabilities", "implement security controls", or "audit security".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts, reference files and assets (for example `assets/README.md`, `references/README.md` and `scripts/README.md`). Compatibility notes: Designed for Claude Code

It sits in Legal & Compliance. It works with PostgreSQL and MySQL. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • You need to work with security and compliance
  • With phrases like scan for vulnerabilities
  • Implement security controls

Example prompts

  • “scan for vulnerabilities”
  • “implement security controls”
  • “audit security”
  • “/scanning-database-security”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*)

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Check authentication configuration by reviewing pg_hba.conf (PostgreSQL) or mysql.user table. Flag any entries using trust authentication…
  2. Audit user privileges by querying role memberships and grants
  3. Scan for default or weak credentials. Check for accounts with no password: PostgreSQL SELECT rolname FROM pg_roles WHERE rolpassword IS…
  4. Verify network security
  5. Check encryption at rest
  6. Scan application source code for SQL injection vulnerabilities using Grep
  7. Review database object permissions
  8. Audit logging configuration
  9. Check for known CVEs by comparing the database version against the latest security advisories. Flag databases running versions with known…
  10. Generate a security findings report with severity levels (Critical, High, Medium, Low), affected components, evidence (query output…

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(psql:*)
    • Bash(mysql:*)
    • Bash(mongosh:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • cisecurity.org
    • postgresql.org
    • cheatsheetseries.owasp.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Scanning Database Security loads about 1.9k tokens when it runs, and up to ~1.9k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 803 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 803 words, ~1,890 tokens.

Download SKILL.mdSave it as .claude/skills/scanning-database-security/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
scanning-database-security
description
Process use when you need to work with security and compliance. This skill provides security scanning and vulnerability detection with comprehensive guidance and automation. Trigger with phrases like "scan for vulnerabilities", "implement security controls", or "audit security".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*)
compatibility
Designed for Claude Code
version
1.27.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
database, security, compliance, audit

Database Security Scanner

Overview

Audit database security configurations, user privileges, network exposure, and data protection controls for PostgreSQL, MySQL, and MongoDB. This skill scans for common vulnerabilities including excessive privileges, missing encryption, default passwords, exposed network ports, unpatched versions, and SQL injection vectors in application code.

Prerequisites

  • Database admin credentials for querying system catalogs and security settings
  • psql, mysql, or mongosh CLI tools installed
  • Access to database configuration files (postgresql.conf, pg_hba.conf, my.cnf, mongod.conf)
  • Application source code access for SQL injection scanning (using Grep/Glob tools)
  • Knowledge of applicable compliance frameworks (SOC 2, HIPAA, PCI-DSS, GDPR)

Instructions

  1. Check authentication configuration by reviewing pg_hba.conf (PostgreSQL) or mysql.user table. Flag any entries using trust authentication, allowing connections without passwords. Verify password_encryption = scram-sha-256 (not md5) in PostgreSQL.

  2. Audit user privileges by querying role memberships and grants:

    • PostgreSQL: SELECT r.rolname, r.rolsuper, r.rolinherit, r.rolcreaterole, r.rolcreatedb FROM pg_roles r WHERE r.rolcanlogin = true
    • MySQL: SELECT user, host, Super_priv, Grant_priv, File_priv FROM mysql.user
    • Flag users with superuser/SUPER privilege, excessive grants, or GRANT OPTION
  3. Scan for default or weak credentials. Check for accounts with no password: PostgreSQL SELECT rolname FROM pg_roles WHERE rolpassword IS NULL AND rolcanlogin = true. Check for well-known default accounts (postgres with default password, root without password, admin/admin).

  4. Verify network security:

    • Check listen_addresses in postgresql.conf (should not be * in production without firewall)
    • Verify SSL/TLS is enforced: SHOW ssl should return on; pg_hba.conf should use hostssl instead of host
    • Confirm database port is not exposed to the public internet
  5. Check encryption at rest:

    • Verify tablespace encryption or volume-level encryption is enabled
    • Scan for sensitive data stored in plaintext: SELECT column_name, data_type FROM information_schema.columns WHERE column_name ILIKE '%password%' OR column_name ILIKE '%ssn%' OR column_name ILIKE '%credit_card%'
    • Flag columns storing PII without encryption or hashing
  6. Scan application source code for SQL injection vulnerabilities using Grep:

    • Search for string concatenation in SQL queries: patterns like "SELECT * FROM " + variable or Python f-strings with interpolated table names
    • Search for missing parameterized queries: raw SQL construction without bind parameters
    • Flag ORM raw() or execute() calls with string interpolation
  7. Review database object permissions:

    • Check for PUBLIC grants on sensitive tables: SELECT grantee, table_name, privilege_type FROM information_schema.table_privileges WHERE grantee = 'PUBLIC'
    • Verify functions are created with SECURITY DEFINER only when necessary
    • Check for world-readable backup files on the filesystem
  8. Audit logging configuration:

    • Verify log_connections = on, log_disconnections = on in PostgreSQL
    • Check log_statement = 'ddl' or 'all' for sensitive databases
    • Confirm audit logs are shipped to a tamper-proof location
  9. Check for known CVEs by comparing the database version against the latest security advisories. Flag databases running versions with known critical vulnerabilities.

  10. Generate a security findings report with severity levels (Critical, High, Medium, Low), affected components, evidence (query output showing the vulnerability), and specific remediation commands.

Output

  • Security findings report with severity-ranked vulnerabilities and evidence
  • Remediation scripts (SQL) for revoking excessive privileges, fixing authentication, enabling SSL
  • Hardened configuration templates for postgresql.conf, pg_hba.conf, or my.cnf
  • SQL injection findings listing vulnerable code locations with fix suggestions
  • Compliance checklist mapping findings to SOC 2, HIPAA, or PCI-DSS controls
Show full SKILL.md (300 more words)Show less

Error Handling

ErrorCauseSolution
Permission denied querying pg_roles or mysql.userScanner account lacks privilege to read user metadataGrant pg_read_all_settings and pg_read_all_stats roles; or run scan with superuser credentials in a controlled session
Cannot access postgresql.conf from SQLFile-system access restricted; pg_file_settings view not availableUse SHOW ALL to check runtime settings; request file access from ops team; use pg_settings catalog view
SSL certificate errors during scanSelf-signed certificates or expired certificates on databaseNote as a finding; generate new certificates with openssl; configure ssl_cert_file and ssl_key_file
Source code scan produces false positivesDynamic SQL construction that uses proper parameterizationReview flagged locations manually; whitelist confirmed-safe patterns; focus on string concatenation with user input
Database version check shows EOL versionDatabase version no longer receiving security patchesPrioritize as critical finding; plan upgrade path; apply last available patches as interim measure

Examples

PostgreSQL security audit revealing over-privileged roles: Scan discovers 5 application users with SUPERUSER privilege, pg_hba.conf using trust for local connections, and SSL disabled. Remediation: revoke SUPERUSER, create application-specific roles with minimum privileges, switch to scram-sha-256 authentication, and enable SSL with Let's Encrypt certificates.

SQL injection scan of a Node.js application: Grep finds 12 instances of db.query("SELECT * FROM users WHERE id = " + req.params.id) across 4 files. Remediation: replace with parameterized queries db.query("SELECT * FROM users WHERE id = $1", [req.params.id]). Each finding includes file path, line number, and corrected code.

PCI-DSS compliance check for payment database: Scan verifies: credit card numbers stored as hashed values (pass), audit logging enabled for cardholder data tables (pass), database admin accounts shared among team members (fail - individual accounts required), backups unencrypted on S3 (fail - enable SSE-S3). Produces compliance gap report with remediation timeline.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references, assets) in skills/.curated/scanning-database-security of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • references/README.md
  • scripts/README.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Scanning Database Security next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scanning Database Security compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scanning Database Security this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: PassMIT
Web Sqlis0ld13rr/pentestcode828—~710Automated safety check: PassMIT
Implementing Pam For Database Accessmukul975/Anthropic-Cybersecurity-Skills34k—~793Automated safety check: PassApache-2.0
How To Communicatedatabasus/databasus8.8k—~3.9kAutomated safety check: PassMIT
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3951 repos~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Web Sqli

    s0ld13rr/pentestcode

    SQL injection detection→exploitation→proof for web apps and APIs.

    828 GitHub stars~710 tokensUpdated 7 days ago
    SecurityAuto-check passed
  • Implementing Pam For Database Access

    mukul975/Anthropic-Cybersecurity-Skills

    Deploy privileged access management for database systems including Oracle, SQL Server, PostgreSQL, and MySQL, covering session proxy configuration, credential vaulting, query auditing, dynamic…

    34k GitHub stars~793 tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • How To Communicate

    databasus/databasus

    Communicate clearly in every response, progress update and agent-authored document.

    8.8k GitHub stars~3.9k tokensUpdated 17 days ago
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    395 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Database Design

    MoizIbnYousaf/ai-agent-skills

    Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases.

    1.1k GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Scanning Database Security

What does Scanning Database Security do?

Process use when you need to work with security and compliance. Scanning Database Security is an agent skill from jeremylongshore/tons-of-skills-marketplace. Process use when you need to work with security and compliance.

When should I use Scanning Database Security?

Scanning Database Security fits situations like: you need to work with security and compliance; with phrases like scan for vulnerabilities; implement security controls.

How do I install Scanning Database Security in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill scanning-database-security -a claude-code`. Or copy the skill folder (skills/.curated/scanning-database-security in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/scanning-database-security in your project. Claude Code loads it when a task matches its description.

How do I install Scanning Database Security in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill scanning-database-security -a codex`. Or copy the skill folder (skills/.curated/scanning-database-security in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/scanning-database-security in your project. Codex loads it when a task matches its description.

Can I use Scanning Database Security in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill scanning-database-security -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scanning-database-security, .gemini/skills/scanning-database-security, .github/skills/scanning-database-security and .opencode/skills/scanning-database-security in your project.

What does Scanning Database Security need to run?

SKILL.md names no scripts, command-line tools or credentials: Scanning Database Security is instructions for the agent only. Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(psql:*), Bash(mysql:*), Bash(mongosh:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Scanning Database Security access the network?

SKILL.md names 3 domains. As links in the text: cisecurity.org, postgresql.org and cheatsheetseries.owasp.org. This is read from the text; nothing was executed.

Is Scanning Database Security safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Scanning Database Security use?

Scanning Database Security is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scanning Database Security use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17 tokens, read only when the agent opens those files.

What are the alternatives to Scanning Database Security?

Skills that share tags, products or a category with Scanning Database Security: Web Sqli (s0ld13rr/pentestcode, 828 stars), Implementing Pam For Database Access (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), How To Communicate (databasus/databasus, 8.8k stars) and SQL Database Support for pREST (prest/prest, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scanning Database Security?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.