postgresql-security

Audit and harden PostgreSQL security configurations for versions 13 and above.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-security
Source: https://github.com/rudi-bruchez/dba-skills/tree/main/skills/postgresql-security
Command: npx skills add https://github.com/rudi-bruchez/dba-skills --skill postgresql-security

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill addresses the critical need to secure PostgreSQL databases by auditing and hardening configurations against common vulnerabilities.

Core Features & Use Cases

  • Comprehensive Auditing: Checks roles, authentication, SSL/TLS, RLS, and logging.
  • Security Hardening: Provides actionable steps to fix identified security gaps.
  • Use Case: A company needs to prepare for a PCI DSS compliance audit. This Skill can be used to perform a thorough security review of their PostgreSQL database, identify non-compliant settings, and guide remediation efforts.

Quick Start

Run the postgresql-security skill to audit the current security posture of your PostgreSQL instance.

Frequently Asked Questions about postgresql-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit PostgreSQL security configurations for compliance?

You can audit PostgreSQL security by reviewing role management, pg_hba.conf authentication, SSL/TLS setup, row-level security policies, and audit logging to identify vulnerabilities and provide actionable hardening steps for compliance.

How do I configure row-level security policies in PostgreSQL?

Configuring row-level security (RLS) policies in PostgreSQL involves setting up access controls on table rows to restrict data visibility based on user roles, which is a core component of hardening your database against unauthorized data access.

Does this PostgreSQL security hardening process work with older database versions?

This PostgreSQL security hardening process is designed specifically for PostgreSQL versions 13 and above, checking roles, authentication, SSL/TLS, RLS, and logging to ensure your instance meets modern security standards.

What is the best way to secure pg_hba.conf authentication in PostgreSQL?

The best way to secure pg_hba.conf is to audit and restrict client connections by enforcing strict authentication methods and SSL/TLS encryption, which prevents unauthorized access and hardens the database instance.

How do I set up audit logging in PostgreSQL for incident response?

To set up audit logging in PostgreSQL for incident response, you configure database logging mechanisms to track security configurations and access events, allowing thorough security reviews and aiding in investigating potential breaches.