Decide whether an agent-authored PostgreSQL statement complies with an execution
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.
Answeringour last check, 2026-11-26
7 of 7checks answered this week
1048 msmedian answer time
$0.02listed price per call
$0.02price it asked us
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
POST https://sqlpermit.schemasure.com/v1/guard/sql
| Category | Code and developer |
|---|---|
| Provider host | sqlpermit.schemasure.com |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 17 from 2 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-11-26 | valid payment request | 402 | $0.02 | 1072 ms |
| 2026-11-25 | valid payment request | 402 | $0.02 | 1048 ms |
| 2026-11-24 | valid payment request | 402 | $0.02 | 758 ms |
| 2026-11-23 | valid payment request | 402 | $0.02 | 928 ms |
| 2026-11-22 | valid payment request | 402 | $0.02 | 955 ms |
| 2026-11-21 | valid payment request | 402 | $0.02 | 1070 ms |
| 2026-11-20 | valid payment request | 402 | $0.02 | 1364 ms |
| 2026-11-19 | valid payment request | 402 | $0.02 | 914 ms |
| 2026-11-18 | valid payment request | 402 | $0.02 | 1025 ms |
| 2026-11-17 | valid payment request | 402 | $0.02 | 634 ms |
| 2026-11-16 | valid payment request | 402 | $0.02 | 1050 ms |
| 2026-11-15 | valid payment request | 402 | $0.02 | 867 ms |
| 2026-11-14 | valid payment request | 402 | $0.02 | 849 ms |
| 2026-11-13 | valid payment request | 402 | $0.02 | 1032 ms |
| 2026-11-12 | valid payment request | 402 | $0.02 | 874 ms |
| 2026-11-11 | valid payment request | 402 | $0.02 | 1058 ms |
| 2026-11-10 | valid payment request | 402 | $0.02 | 847 ms |
| 2026-11-09 | valid payment request | 402 | $0.02 | 891 ms |
| 2026-11-08 | valid payment request | 402 | $0.02 | 962 ms |
| 2026-11-07 | valid payment request | 402 | $0.02 | 1021 ms |
| 2026-11-06 | valid payment request | 402 | $0.02 | 1046 ms |
| 2026-11-05 | valid payment request | 402 | $0.02 | 1132 ms |
| 2026-11-04 | valid payment request | 402 | $0.02 | 999 ms |
| 2026-11-03 | valid payment request | 402 | $0.02 | 1094 ms |
| 2026-11-02 | valid payment request | 402 | $0.02 | 1125 ms |
| 2026-11-01 | valid payment request | 402 | $0.02 | 936 ms |
| 2026-10-31 | valid payment request | 402 | $0.02 | 1112 ms |
Example input (from the provider)
{
"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"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"audience": {
"description": "Identity of the ONE executor the permit is for. Required when issue_permit is true. Wildcards are rejected.",
"type": "string"
},
"dialect": {
"enum": [
"postgresql"
],
"type": "string"
},
"issue_permit": {
"type": "boolean"
},
"policy": {
"additionalProperties": false,
"properties": {
"allow_multi_statement": {
"description": "Permit more than one statement in the input. Defaults to false.",
"type": "boolean"
},
"allow_returning": {
"description": "Accept RETURNING on a permitted write without a warning.",
"type": "boolean"
},
"allow_row_locks": {
"description": "Accept SELECT ... FOR UPDATE without a warning.",
"type": "boolean"
},
"allowed_functions": {
"description": "Added to the built-in allowlist. Bare name, or schema.function to admit one of your own.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_languages": {
"description": "Permitted CREATE FUNCTION languages. Defaults to none.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_schemas": {
"description": "Schemas the statement may reference.",
"items": {
"type": "string"
},
"type": "array"
},
"allowed_tables": {
"description": "Permitted relations as schema.table, or a bare name to match an unqualified reference.",
"items": {
"type": "string"
},
"type": "array"
},
"max_rows": {
"description": "Row ceiling. Becomes a permit obligation the executor enforces.",
"minimum": 1,
"type": "integer"
},
"read_only": {
"description": "Reject anything that can change data or schema, including writes reached through a CTE.",
"type": "boolean"
},
"statement_timeout_ms": {
"description": "Timeout written into the permit obligations. Defaults to 30000.",
"minimum": 1,
"type": "integer"
}
},
"type": "object"
},
"sql": {
"maxLength": 100000,
"minLength": 1,
"type": "string"
},
"subject": {
"description": "Opaque caller label recorded as the permit subject.",
"type": "string"
},
"target_pg_major": {
"description": "Required. The PostgreSQL major the statement will run on. Only 18 is supported in v1: a permit issued under one grammar and verified against another is a parser differential.",
"enum": [
18
],
"type": "integer"
}
},
"required": [
"dialect",
"target_pg_major",
"sql"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"confidence": {
"type": "number"
},
"data_versions": {
"type": "object"
},
"evidence": {
"items": {
"properties": {
"code": {
"description": "Stable reason code, e.g. DATA_MODIFYING_CTE.",
"type": "string"
},
"data": {
"type": "object"
},
"detail": {
"type": "string"
},
"disposition": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"severity": {
"enum": [
"info",
"low",
"medium",
"high",
"critical"
],
"type": "string"
},
"source": {
"type": "string"
},
"span": {
"properties": {
"end": {
"type": "integer"
},
"start": {
"type": "integer"
}