← Back to directory

Decide whether an agent-authored PostgreSQL statement complies with an execution...

https://sqlpermit.schemasure.com/v1/guard/sql

Overview

Decide whether an agent-authored PostgreSQL statement complies with an execution policy, using PostgreSQL's own parser rather than pattern matching. Detects statement stacking, data-modifying CTEs, COPY PROGRAM, privilege changes, and dangerous functions that read as ordinary SELECTs. Returns reason codes and an optional short-lived signed permit bound to the exact normalized statement. Never connects to your database.

Protocol x402 (POST)
Price $0.02
Payment Asset USD Coin
Payment Network eip155:8453
Category uncategorized
Provider SQLPermit
Source bazaar
Indexed 2026-08-05 10:12:21

Health

Status healthy
Latency (p50) 632ms
Uptime (30d) 95.0%
Reliability Score 87.5/100
Last Checked 2026-10-31 07:08:09
Last Healthy 2026-10-31 07:08:09
Consecutive Failures 0

x402 Payment Validation

Payment Requirements Valid
Asset Verified Known USDC
Facilitator —

Input Schema

{ "body": { "audience": "executor:acme-prod-01", "dialect": "postgresql", "issue_permit": true, "policy": { "allow_multi_statement": false, "allowed_functions": [ "count", "sum", "avg" ], "allowed_schemas": [ "analytics" ], "allowed_tables": [ "analytics.orders" ], "max_rows": 1000, "read_only": true }, "sql": "SELECT id, total FROM analytics.orders ORDER BY created_at DESC LIMIT 100", "target_pg_major": 18 }, "bodyType": "json", "method": "POST", "type": "http" }

Output Schema

{ "example": { "confidence": 1, "data_versions": { "grammar": "pg18/libpg-query@18.1.4", "parser": "libpg-query@18.1.4", "pg_parse_version": "180004" }, "evidence": [], "ok": true, "policy_version": "sqlpermit-policy-1.0.0", "request_hash": "sha256:1c2d0f4c1d8e2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b", "result": { "classification": "read_only", "findings": [], "grammar": "pg18/libpg-query@18.1.4", "normalized_sql": "SELECT id, total FROM analytics.orders ORDER BY created_at DESC LIMIT 100", "obligations": { "max_rows": 1000, "require_read_only_tx": true, "statement_timeout_ms": 30000 }, "permit": "eyJhbGciOiJFZDI1NTE5Iiwia2lkIjoi…", "permit_expires_at": "2026-08-03T12:00:45.000Z", "permit_kid": "uGzLTTwi4LTsOiBLgwf2wMU7ILTecj18Y_71Y37bVD8", "policy_hash": "sha256:2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d0f4c1d8e", "referenced_functions": [], "referenced_schemas": [ "analytics" ], "referenced_tables": [ "analytics.orders" ], "statement_count": 1, "statement_types": [ "SelectStmt" ], "stmt_fingerprint": "a1b2c3d4e5f60718", "stmt_hash": "sha256:0f4c1d8e2b7a9c5d3e6f8a1b2c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d", "target_pg_major": 18 }, "risk_codes": [], "verdict": "pass", "warnings": [ "stmt_fingerprint is ADVISORY and must not be used for authorization: libpg-query fingerprints discard literal constants, so two statements differing only in a value share one fingerprint. stmt_hash is the binding value." ] }, "type": "json" }