Security Policy
Supported Versions
| Version | Supported |
|---|---|
0.1.x |
Yes |
< 0.1.0 |
No |
Reporting a Vulnerability
Please do not report security vulnerabilities through public GitHub issues.
Instead, report them privately using either:
- GitHub Security Advisories (preferred): open a private advisory at
https://github.com/cwj2001/pgbreaker/security/advisories/new. - Email: send details to
2965241316@qq.comwith the subject prefix[pgbreaker security].
Please include:
- PostgreSQL major/minor version and operating system/architecture
pgbreakerversion or commit SHA- Minimal reproduction steps or SQL snippet
- Expected impact (e.g., crash/DoS, privilege escalation, bypass, slot leak, or information disclosure)
You can expect an initial acknowledgment within 3 business days and coordinated disclosure once a fix is verified.
Security Model & Scope
- Privilege boundary:
pgbreakerruns inside PostgreSQL server processes (shared_preload_libraries). All 5 mutating control functions requiresuperuser()in C in addition toREVOKE ALL FROM PUBLICin SQL. Read-only observability views (pgbreaker.rules,pgbreaker.status) are granted exclusively topg_read_all_stats(neverPUBLIC), andstatus.persist_pathredacts$PGDATAunless the caller also holdspg_read_all_settings. - Schema installation guard:
CREATE EXTENSION pgbreakerrefuses installation into an existing schema not owned by a superuser, grantingCREATEto any non-superuser (direct or inherited), or containing pre-existing relations, functions, or types. - Persistence safety:
$PGDATA/pg_stat/pgbreaker.rulesis opened withO_NONBLOCK/O_NOFOLLOWandS_ISREGchecks on startup, written viaO_CREAT | O_EXCL | O_NOFOLLOWunique temporary files with CRC32C checksums, and fails open on corrupt or unreadable files without blocking PostgreSQL startup. - Out of scope:
pgbreakeris an availability and load-shedding kernel primitive—not a SQL injection firewall, auditing system, or row/table access-control mechanism. Bugs in thedemo/local Docker harness’s hardcoded test passwords (demo_password/app_pass, bound strictly to container loopback127.0.0.1with no published host ports) are not production vulnerabilities.