Skip to content

Releases

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 20:29

Changelog

  • f352037 ci: add Codecov coverage upload and pkg.go.dev/codecov badges
  • 807bda9 feat: ship v0.5.0 Streamable HTTP MCP, ChatOps HITL, and Sideband Cost Guard
  • 772ba35 test(ci): raise coverage to 84.1% and integrate Codecov upload

pgveil v0.4.0 — AST Virtual Row-Level Security (RLS), Zero-Config pgveil demo & pgveil init

Choose a tag to compare

@github-actions github-actions released this 21 Nov 19:14

Highlights

1. AST-Level Virtual Row-Level Security (RLS) & Tenant Predicate Injection

Enforce multi-tenant and regional row isolation directly at the PostgreSQL wire layer with zero database RLS policies, views, or schema changes:

  • Parses approved queries using PostgreSQL 17's own C AST (libpg_query), qualifies table aliases, injects LEFT JOIN / RIGHT JOIN predicates into ON clauses, wraps FULL OUTER JOIN & USING/NATURAL joins as filtered subqueries, prevents CTE double-injection on shadowed table names, and emits canonical SQL via pg_query.Deparse.
  • Works across Simple Query ('Q'), Extended Query parameterized Parse ('P') frames (, ), and native pgveil mcp.
  • Supports SQLi-safe quote-escaped session placeholders ({{db_user}}, {{database}}, {{application_name}}, {{profile}}) and validates every row_filters predicate at config load & hot-reload time.
  • Security Ordering Invariant: Firewall checks (block_write_without_where, tautology analysis, CTE taint & PII side-channel guards) strictly execute on the original client SQL before Virtual RLS injects predicates.

2. Zero-Config Interactive Sandbox (pgveil demo)

Try the full Precision Workbench UI (:8088), live PostgreSQL wire proxy (:6432), PII masking, AST firewall, live HITL holds, PII Discovery, and Virtual RLS (tenant_tr) in 3 seconds with zero Docker and zero external PostgreSQL:

brew install duhanguler/tap/pgveil && pgveil demo

3. Live Onboarding Wizard (pgveil init)

Scan any existing PostgreSQL database and synthesize a complete, validated pgveil.yaml with a cryptographic HMAC key, discovered column_rules, protected_columns, and denied_tables:

pgveil init --dsn "postgres://user:pass@localhost:5432/mydb" --output pgveil.yaml

4. Workbench UI Upgrades (68.7 KB gzip)

  • Live debounced AST Pre-Flight bar displays RLS: +N filters and a wrapped Virtual RLS → rewritten SQL preview as you type.
  • Event Inspector slide-over drawer displays both Original SQL and Rewritten SQL (Virtual RLS) with applied predicate badges.
  • Ships with the new backwards-compatible tenant_tr demo profile and RLS Tenant JOIN preset.

pgveil v0.3.2 — Bulletproof AST Firewall (Taint Tracking, Fail-Closed DDL & 1M+ Fuzzing)

Choose a tag to compare

@github-actions github-actions released this 21 Nov 18:20

Bulletproof PostgreSQL 17 AST Firewall Architecture

Refactored internal/firewall into modular, fuzz-hardened security engines (firewall.go, ast_walk.go, taint.go, redteam_test.go) verified with 99 adversarial Red-Team CTF test cases and 1,019,085 native Go fuzz executions (FuzzEvaluate) with 0 panics at 56.96 µs/op.

1. Fixed-Point Multi-Hop AST Taint Propagation

  • Tracks protected PII column aliases transitively across multi-hop CTEs, explicit CTE/subquery column lists, and nested subqueries — closing bypasses like WITH leak AS (SELECT id, tckn AS x FROM customers) SELECT id FROM leak WHERE x LIKE '100000%'.
  • Resolves transitive CTE, scalar subquery, and UNION/INTERSECT/EXCEPT column provenance so SELECT 0, 'header' UNION ALL SELECT id, full_name FROM customers still inherits explicit column_rules masking on the wire and MCP.

2. Whole-Row Exfiltration, Positional Oracles & PG 16/17 SQL/JSON + XML Guards

  • Whole-Row Exfiltration Blocker (pii_whole_row_exfiltration): Blocks SELECT c::text FROM customers c, SELECT customers::text, SELECT row_to_json(c), SELECT to_jsonb(customers), and bare SELECT c FROM customers c.
  • Positional Index Oracles: Blocks SELECT id, tckn FROM customers ORDER BY 2, GROUP BY 1, 2, and UNION ... ORDER BY 2 binary-search probes.
  • PG 16/17 SQL/JSON & SQL/XML: Blocks JSON_OBJECT, JSON_ARRAY, JSON_OBJECTAGG, JSON_ARRAYAGG, XMLFOREST, XMLELEMENT, XMLSERIALIZE, XMLTABLE, JSON_TABLE, JOIN ... USING (tckn), and LIMIT (SELECT ... WHERE tckn ...).

3. Fail-Closed DDL, COPY Exfiltration, Arithmetic Tautologies & DoS Shields

  • Fail-Closed DDL Classification: Explicitly handles 55+ PG17 DDL statements (ALTER TABLE RENAME, ALTER OWNER, DROP OWNED, CREATE SUBSCRIPTION, CREATE SERVER FDW, etc.) AND defaults any unrecognized top-level statement to isDDL = true.
  • Automatic COPY TO STDOUT Guard: Blocks unmasked CopyData exfiltration whenever masking.enabled or max_rows > 0.
  • Expanded Catalog & Function Lockout: Blocks 75+ dangerous functions (current_setting, setval, pg_sleep*, pg_advisory_lock*, lo_*, dblink*, *_to_xml*) and 32+ sensitive catalogs (pg_user_mappings, pg_subscription, pg_largeobject, pg_stats*, pg_stat_activity, pg_toast.*).
  • Arithmetic & Structural Tautology Solver: Catches 1 + 1 = 2, 10 - 5 > 3, 5 BETWEEN 1 AND 10, 1 IS NOT NULL, (1=1) IS TRUE, id IS NOT DISTINCT FROM id, COALESCE(true, false), CASE WHEN 1=1 THEN true, EXISTS (SELECT 1), 'x' LIKE '%', recursive NOT (false OR 1=2), and MERGE ... ON 1=1.
  • Pre-Parse Hygiene: Rejects embedded NUL bytes (invalid_nul_byte), enforces 1 MiB SQL cap (sql_size_limit), and bounds AST traversal depth (maxASTDepth = 128).

Install / Upgrade

brew update && brew upgrade pgveil
# or fresh install:
brew install duhanguler/tap/pgveil

pgveil v0.3.1 — Security & Protocol Hardening Release

Choose a tag to compare

@github-actions github-actions released this 21 Nov 17:49

Security & Protocol Hardening (16 Fixes + Adversarial Regression Tests)

Wire Protocol & Extended Query Hardening

  • Block Legacy Fast-Path FunctionCall ('F'): Closes wire-protocol bypass that could invoke server OID functions (pg_read_file, lo_export) without SQL AST inspection (SQLSTATE 0A000).
  • Fix Pipelined Extended Query Multi-Statement Bypass: Evaluates every Parse and Bind frame in a pipeline batch so a blocked statement can never hide behind a trailing SELECT 1.
  • AST Column Alias Provenance: SELECT full_name AS display_name now inherits explicit column_rules masking on both Wire Proxy and native MCP.
  • Fix Multi-Frame Flush Relay & hitl_mode: reject: Accurately relays all response frames on Flush-only batches and marks reject-mode HITL entries DENIED immediately.

PostgreSQL 17 AST Firewall & Side-Channel Oracle Guard

  • Expanded Side-Channel Coverage: Blocks projection LIKE/ILIKE/>/~ probes, COUNT(*) FILTER (WHERE tckn ...), ROW_NUMBER() OVER (ORDER BY tckn), DISTINCT ON (tckn), tckn::bytea hex exfiltration, and EXPLAIN SELECT ... WHERE tckn = ....
  • Expanded Dangerous Functions & Catalogs: Walks VALUES (...), PREPARE, MERGE, CALL, SELECT INTO; blocks table_to_xml, set_config, SET row_security = off, pg_stats (raw planner PII samples), and pg_stat_activity.
  • Expanded Tautology Detection: Catches 2 > 1, 1 <> 2, id = id, NOT (1 = 2), and 1 IN (1, 2).

PII Engine, Control Plane API, MCP & Audit Worker

  • Standalone AWS Key Fast-Path Fix: Uppercase-heavy AWS keys with <4 digits (AKIAIOSFODNN7EXAMPLE) are never skipped; added Stripe (sk_live_) and Slack (xoxb-) detectors; UTF-8 rune-safe masking for non-ASCII emails.
  • Control Plane Secret Redaction & Auth: GET /api/v1/policies redacts passwords/keys/webhooks with __PGVEIL_REDACTED__ while preserving existing secrets across Policy Studio hot-reloads; added optional PGVEIL_ADMIN_TOKEN Bearer auth.
  • MCP Hardening: Enforces denied_tables/allowed_tables on schema-qualified describe_table("public.api_secrets"), blocks EXPLAIN ANALYZE in explain_query, and URL-encodes upstream credentials with UpstreamTLS support.
  • Discovery & Audit Worker Reliability: Deterministic multi-entity strategy selection, 5s per-column timeouts, bounded rate-limiter fingerprint maps, and graceful SIGTERM final-batch flush with a fresh context.

Install / Upgrade

brew update && brew upgrade pgveil
# or fresh install:
brew install duhanguler/tap/pgveil

pgveil v0.3.0 — Precision Database Workbench UI & macOS Homebrew Tap

Choose a tag to compare

@github-actions github-actions released this 21 Nov 17:23

Highlights

1. Precision Database Workbench UI (67 KB gzip embedded binary)

  • Complete Anti-Bloat Redesign: Neutral Carbon Dark (#09090B) + Swiss Light Theme (☀/☾), 1px hairline borders, monochrome primary actions, and full-viewport edge-to-edge split panes.
  • Line-Numbered SQL & YAML Syntax Highlighter: Zero-dependency tokenizer overlay with ⌘↵ live wire execution and debounced AST Pre-Flight inspection bar.
  • ⌘K Command Palette: Jump views, switch active role profiles, trigger attack/masking presets, or start a live schema PII scan from the keyboard.
  • Right-Side Audit Inspector Slide-Over Drawer: Inspect full syntax-highlighted SQL, AST fingerprint, policy rule, proxy/upstream latency breakdown, and masked PII entity counts without squishing the audit table.
  • PII Discovery Split Pane: Live PostgreSQL schema risk matrix alongside syntax-highlighted, copy-ready pgveil.yaml policy generation.

2. Native macOS Apple Silicon (arm64) & Intel (amd64) Binaries + Homebrew Tap

Install on macOS or Linux in one command:

brew install duhanguler/tap/pgveil
pgveil discover --dsn "postgres://user:pass@localhost:5432/mydb"

Container Images

docker pull ghcr.io/duhanguler/pgveil:v0.3.0
docker pull ghcr.io/duhanguler/pgveil-audit-worker:v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 16:35

Changelog

  • e0ddcba chore(release): preserve dist/.gitkeep during UI build and use GoReleaser v2 archive formats
  • 87afc9a chore(release): split GoReleaser archives per binary and add buildx for GHCR push
  • dc851f9 feat(v0.2.0): AST PII side-channel guard, live schema PII discovery, native MCP server, loop breaker, shadow mode & binary pgx Extended Protocol
  • 196fea7 feat: initial release of pgveil v0.1.0 — zero-trust PostgreSQL wire-protocol PII masking & AI-agent SQL firewall proxy
  • 69150ad fix: emit non-blocking audit event before ReadyForQuery for strict causal ordering