Changelog
Upstream reference for SafeSession 1.1. Mimus 19.0.1 integrates Spock 5.0.15. Compatibility of SafeSession with Mimus is unverified.
All notable changes to the pgEdge SafeSession will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.1] - 2026-11-06
Changed
- Release workflow installs the repository client certificate before configuring the pgEdge package repositories, and verifies that the key matches the certificate, that the certificate and its issuer are within their validity periods, and that the chain issuer is the expected one
- Release workflow fails if the repository rewrite fails
- Release workflow pins the builder action by commit SHA
- Packaging no longer builds for Debian bullseye
- Packaging defaults now target v1.1
- Removed pgEdge Labs branding from the README and documentation landing page
[1.0] - 2026-08-25
Added
SECURITY.md, documenting how to report a vulnerability
[1.0-beta1] - 2026-08-21
Added
Initial release of pgEdge SafeSession
GUC
pgedge_safesession.roles(SUSET) to specify restricted rolesExecutorStart hook to block DML (INSERT, UPDATE, DELETE, MERGE) and C-language function execution
ProcessUtility hook to block DDL, COPY FROM, GRANT/REVOKE, VACUUM/ANALYZE, exclusive locks, and GUC tampering
Session-user anchored role checking: SET ROLE cannot escape restrictions
Superuser exemption: superusers are never restricted
Role membership inheritance via
is_member_of_role()Belt-and-suspenders: automatic
default_transaction_read_only = onfor restricted sessionsSECURITY DEFINER bypass prevention: session user is always checked regardless of effective user
Comprehensive regression test suite covering:
- Basic DML blocking
- SET ROLE bypass prevention
- PL/pgSQL and SQL function enforcement
- DDL blocking
- COPY FROM/TO handling
- CREATE TABLE AS / SELECT INTO blocking
- SECURITY DEFINER function enforcement
- Role membership inheritance and superuser exemption
Configurable protection layers via new SUSET GUCs:
block_dml: toggle DML blocking (default: on)block_ddl: toggle DDL blocking (default: on)block_c_functions: toggle C-language function blocking (default: on)block_all_c_functions: block all C functions regardless of volatility (default: off)
COPY TO PROGRAM blocking for restricted sessions
SET TRANSACTION READ WRITE blocking for restricted sessions
New regression tests for advanced attack vectors (PREPARE/EXECUTE, DO blocks, aggregates, WHERE clauses, SET TRANSACTION)
New regression tests for GUC toggle behavior
Changed
- C-language function blocking now only blocks VOLATILE
C functions by default. IMMUTABLE and STABLE C functions
(e.g., PostGIS geometry operations, pgvector distance
operators) are allowed. Use
block_all_c_functions = onto restore the previous behavior of blocking all C functions. - Built-in function blocking now denies any VOLATILE
built-in by default, allowing only a curated list of
built-ins confirmed to have no observable side effect
(e.g.,
random(),clock_timestamp()). Previously, built-ins were allowed by default and blocked only if their name matched a fixed denylist, regardless of volatility. PostgreSQL ships hundreds of volatile built-ins, and the old denylist covered only a small fraction of them.
Fixed
The fixes extend read-only policy enforcement to indirect function calls, transaction state and index maintenance. Role membership changes trigger checks on cached plans. After updating, test read-only pool settings, prepared queries and monitoring views with the restricted role, and review its grants.
Upstream source · d66225fcceef · Copyright (c) 2025–2026, pgEdge, Inc. PostgreSQL License.