Grantguard

•

Verify Postgres roles only have the write permissions they are explicitly allowed, preventing silent privilege escalation.

Grantguard is a robust security tool designed to prevent unintended privilege escalation in PostgreSQL databases. It addresses a critical issue where seemingly innocuous SQL migrations can silently widen a role's write access from specific columns to an entire table. By reading directly from PostgreSQL's `pg_catalog`, Grantguard provides a factual audit of actual permissions, comparing them against a committed policy file. It then acts as a CI/CD gate, failing builds when live database grants diverge from the declared least-privilege policy, ensuring unattended agents and services operate with the minimal necessary access.

주요 기능

01Policy-driven least-privilege enforcement via YAML files
02MCP server with `explain_write` for specific write path analysis
030 GitHub stars
04Declarative `never_writable` for critical column protection
05Catalog-based privilege auditing (not migration parsing)
06CI/CD gate integration for automated security checks

사용 사례

01Auditing existing Postgres role privileges for least-privilege compliance
02Gating CI/CD pipelines to prevent unintended privilege escalations
03Enforcing least-privilege access for autonomous agents and unattended services