Skip to content

Security: Lynsoft/pg-guard

Security

SECURITY.md

Security policy

What this project guarantees

  • Context values are passed to PostgreSQL as parameters, not interpolated SQL.
  • Role and schema names come from configuration and are identifier-validated.
  • User operations run as a restricted role after SET LOCAL.
  • Context GUCs are transaction-local (set_config(..., true)).
  • Missing user context does not become system access.
  • Hooks do not receive passwords, tokens, cookies, or full claims.

PostgreSQL RLS and GRANTs remain the enforcement boundary. Incorrect policies are application bugs.

Reporting

Report vulnerabilities privately to the maintainers (replace this placeholder with a security contact or GitHub Security Advisory). Do not open a public issue for exploitable authorization bypasses.

Must-nots for operators

  • Do not connect the app pool as a superuser or table owner.
  • Do not grant BYPASSRLS to app_authenticated.
  • Do not put DATABASE_URL in client-visible environment variables.
  • Do not apply pg-guard init output without replacing placeholder passwords.
  • Do not trust unverified JWTs or request headers as userId.

There aren't any published security advisories