High-risk tools in Postgres
8 of the 36 tools in Postgres are classified as high risk. This page profiles those tools specifically, with recommended policy actions and the attack patterns that target them.
Every operation listed below is an action PolicyLayer recommends controlling at the transport layer. Open any tool to see the full profile, risk score, and YAML policy snippet.
Tools at high risk
-
batch_executeExecuteExecute multiple SQL queries in parallel. Returns all results keyed by query name. Efficient for fetching multiple independent pieces of data in one call. Optionally use server/...
-
begin_transactionExecuteStart a new database transaction. Returns a transactionId to use with execute_sql, commit_transaction, or rollback_transaction. Transactions allow atomic execution of multiple s...
-
dry_run_sql_fileExecuteExecute a SQL file in dry-run mode - actually runs ALL statements within a transaction, captures REAL results for each (row counts, errors with line numbers, constraint violatio...
-
execute_sqlExecuteExecute SQL queries. Supports SELECT, INSERT, UPDATE, DELETE (if not in readonly mode). Use $1, $2 placeholders with params array to prevent SQL injection. Use allowMultipleStat...
-
execute_sql_fileExecuteExecute a .sql file from the filesystem. Useful for running migration scripts, schema changes, or data imports. Supports transaction mode for atomic execution. Max file size: 50...
-
kill_queryExecuteCancel or terminate a backend session by PID. mode=
-
mutation_dry_runExecuteExecute INSERT/UPDATE/DELETE in dry-run mode - actually runs the SQL within a transaction, captures REAL results (exact row counts, actual errors, before/after data), then ROLLB...
-
safe_alter_tableExecuteConvert a high-level intent (
Attacks that target this class
High-risk tools in any server share these documented attack patterns. Each links to the full case and the defensive policy.