DeltaScope is an offline-first PostgreSQL DDL audit tool and PostgreSQL migration risk checker that reviews schema changes, access grants, and other DDL/DCL statements before they reach your database. It works entirely from static SQL text — no live connection needed.
Pass your PostgreSQL SQL to DeltaScope with --dialect postgresql. It parses the statement, evaluates all applicable rules, and returns structured findings.
$ deltascope audit --dialect postgresql \
--sql "GRANT ALL PRIVILEGES ON TABLE users TO analyst;"
Verdict: review
Statements: 1
Blockers: 0
Warnings: 1
Notices: 1
Statement 1: GRANT TABLE
- [notice] ddl.pg.grant.table_privilege.notice: granting privilege on table "users"
- [warning] ddl.pg.grant.table_privilege.all.warn: granting ALL PRIVILEGES is broader than needed
DeltaScope covers PostgreSQL-specific DDL including CREATE TABLE with constraints, ALTER TABLE operations, composite type lifecycle, extension lifecycle, and table-level privilege DCL grants.
ddl.pg.grant.table_privilege.all.warn)ddl.pg.grant.table_privilege.notice)# Audit a PostgreSQL migration file in CI
deltascope audit \
--dialect postgresql \
--file ./migrations/20260409_add_column.sql \
--format github-actions \
--fail-on warning
Supported output formats: json, github-actions, sarif, gitlab-codequality, text.
notice variant (ddl.pg.grant.table_privilege.notice) flags any table privilege grant for awareness. The all.warn variant (ddl.pg.grant.table_privilege.all.warn) warns when ALL PRIVILEGES is granted because it is typically broader than necessary.--dialect postgresql or --dialect mysql. The same engine, config format, and CI integrations work for both.