- Home
- Skills
- Data & Databases
- PostgreSQL Config Check
More screenshots
Works with the AI Agents you already use
PostgreSQL Config Check
One "host all all 0.0.0.0/0 trust" line in pg_hba.conf, or POSTGRES_HOST_AUTH_METHOD=trust in Docker, lets anyone who reaches the port log in as the superuser with no password.
$5
PostgreSQL Config Check
Example session with this skill installed
Check this project with postgres-config-check.
- Read your context and instructions
- Compiled the postgresql config check
$ python3 scripts/check_pgconf.py examples/risky
BLOCK docker-compose.yml:5 G01 TRUST_FROM_NETWORK
POSTGRES_HOST_AUTH_METHOD: trust
Why: A pg_hba.conf host line uses the trust method for a network address, or the Docker image is told POSTGRES_HOST_AUTH_METHOD=trust. Anyone who can reach the port logs in as any user, including the postgres superuser, with no password.
Safer: Use scram-sha-256 (with hostssl) for every network line and keep trust, if at all, only for local socket connections you control. In Docker, set POSTGRES_PASSWORD instead.
BLOCK pgdata/pg_hba.conf:3 G01 TRUST_FROM_NETWORK
BLOCK pgdata/pg_hba.conf:4 G02 CLEARTEXT_PASSWORD
BLOCK pgdata/postgresql.conf:6 G03 DURABILITY_OFF
REVIEW pgdata/pg_hba.conf:2 G11 LOCAL_TRUST
REVIEW pgdata/pg_hba.conf:5 G14 MD5_PASSWORDS
REVIEW pgdata/pg_hba.conf:6 G12 ANY_ADDRESS_ALLOWED
REVIEW pgdata/pg_hba.conf:6 G17 SUPERUSER_FROM_NETWORK
REVIEW pgdata/postgresql.conf:1 G13 LISTENS_WITHOUT_SSL
REVIEW pgdata/postgresql.conf:4 G16 OLD_TLS_VERSION
REVIEW pgdata/postgresql.conf:5 G14 MD5_PASSWORDS
REVIEW pgdata/postgresql.conf:7 G15 STATEMENTS_LOGGED
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 3 files, 3 with PostgreSQL config content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
One "host all all 0.0.0.0/0 trust" line in pg_hba.conf, or POSTGRES_HOST_AUTH_METHOD=trust in Docker, lets anyone who reaches the port log in as the superuser with no password. This skill finds that and nine other PostgreSQL configuration mistakes before your server goes live, and tells you how to fix each one.
Your agent runs a scanner on pg_hba.conf, postgresql.conf, postgresql.auto.conf and Docker Compose, Dockerfile and .env files that mention postgres. It reads pg_hba.conf lines the way PostgreSQL does (types, CIDR or netmask addresses, methods, quotes, comments) and settings where the last value wins. It never connects to PostgreSQL. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach.
What it checks
BLOCK
- G01: trust logins from the network, or POSTGRES_HOST_AUTH_METHOD=trust
- G02: cleartext password logins without SSL
- G03: fsync or full_page_writes off (corruption after a crash)
REVIEW
- G11: trust on local socket and 127.0.0.1 lines
- G12: rules for every address (0.0.0.0/0, ::/0, all)
- G13: listen_addresses open with ssl off
- G14: MD5 passwords
- G15: log_statement that writes passwords to the logs
- G16: TLS 1.0 or 1.1 allowed
- G17: the postgres superuser allowed from the network
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- Risky and safe example configs (pg_hba.conf, postgresql.conf, docker-compose.yml), and the real report the scanner produces on the risky ones
Limits It reads each file as written: include files, ALTER SYSTEM settings on a running server, firewalls and managed services (RDS, Cloud SQL, Supabase) are not seen. NOT FLAGGED is not a guarantee.
Static check of config files. Included files, settings made on a running server, firewalls and managed database services are not seen. NOT FLAGGED is not a guarantee.
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 any payment.
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 5 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls.