agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/database-security/db-hardening/SKILL.md

db-hardening

Skill0 starsChanged 11 days agoMITView on GitHub

Harden database servers and managed databases — network exposure, TLS, authentication methods (pg_hba, SQL auth vs. Windows/Entra), dangerous features (xp_cmdshell, COPY PROGRAM, LOAD DATA LOCAL), encryption at rest/TDE, patching, backups encryption — against CIS benchmarks. Use when deploying or reviewing a database, after finding an internet-exposed database, or remediating database benchmark findings.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not internet-reachable; private subnets/endpoints only (cloud-exposure-review: PubliclyAccessible, public IP on Azure SQL/Cloud SQL, open …

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Database Hardening

Exposure and network

  • Not internet-reachable; private subnets/endpoints only (cloud-exposure-review: PubliclyAccessible, public IP on Azure SQL/Cloud SQL, open 1433/3306/5432/27017/6379/9200).
  • Host firewall / security groups restrict to app tiers and admin jump hosts.
  • NoSQL/search engines: authentication enabled (MongoDB security.authorization: enabled, Redis requirepass/ACLs + protected-mode yes, Elasticsearch security features on) — unauthenticated instances are mass-scanned and ransomed within hours.

Authentication & transport

  • PostgreSQL pg_hba.conf: hostssl + scram-sha-256, no trust, no 0.0.0.0/0 for admin roles; ssl = on; password_encryption = scram-sha-256.
  • SQL Server: Windows/Entra authentication preferred; if SQL auth, enforce policy; disable sa or rename + strong secret; force encryption.
  • MySQL: require_secure_transport=ON, caching_sha2_password, no anonymous users.

Dangerous features

EngineDisable/restrict
SQL Serverxp_cmdshell, Ole Automation Procedures, CLR (clr enabled/clr strict security), Ad Hoc Distributed Queries, cross-db ownership chaining — check with SELECT name, value_in_use FROM sys.configurations WHERE name IN ('xp_cmdshell','clr enabled','Ole Automation Procedures','Ad Hoc Distributed Queries');
PostgreSQLpg_execute_server_program/pg_read_server_files grants, untrusted languages (plpython3u) for non-admins, COPY ... PROGRAM
MySQLlocal_infile=OFF, secure_file_priv set to a dedicated dir or NULL, FILE privilege
OracleDefault accounts locked, UTL_* package grants to PUBLIC revoked

Data protection

Encryption at rest (TDE / managed storage encryption with KMS keys), encrypted backups with restricted access, masking in non-prod copies, audit logging (db-audit-logging).

Patch & version

Supported major versions only; track CVEs for the engine; managed services' maintenance windows enabled.

Related skills

db-privilege-review, db-audit-logging, cloud-exposure-review, linux-hardening

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.