SQL change review
Statically parse caller-supplied SQL without a database connection or execution, inventory statements and tables, and flag destructive DDL, unfiltered writes, and migration atomicity concerns.
$0.05 USDCBasex402 v2POST
Endpoint
https://apiacre.com/v1/developer/sql-change-reviewSend the JSON body below. An unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header; an x402-compatible buyer signs the requirement and retries with PAYMENT-SIGNATURE.
Input example
{
"sql": "UPDATE accounts SET status = 'inactive'; DROP TABLE legacy_accounts;",
"dialect": "postgres"
}Response shape
{
"request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
"service": "developer.sql-change-review",
"version": "1",
"data": {
"documentSha256": "81d4638194a2fe9a5657ba1fe6783383609e511d0b3ae6fa0a0a52e03f7f44ce",
"dialect": "postgres",
"valid": true,
"reviewDecision": "manual-review",
"attentionScore": 72,
"attentionLevel": "high",
"statementCount": 2,
"summary": {
"readStatements": 0,
"dataChangeStatements": 1,
"schemaChangeStatements": 1,
"transactionStatements": 0,
"otherStatements": 0,
"unfilteredDataChanges": 1,
"destructiveChanges": 2,
"referencedTables": [
"accounts",
"legacy_accounts"
],
"targetObjects": [
"accounts",
"legacy_accounts"
]
},
"statements": [
{
"index": 1,
"operation": "UPDATE",
"category": "data-change",
"readOnly": false,
"targetObjects": [
"accounts"
],
"referencedTables": [
"accounts"
],
"sourceTables": [],
"hasWhere": false,
"hasLimit": false,
"parameterCount": 0,
"normalizedPreview": "UPDATE accounts SET status = 'inactive'",
"statementSha256": "c1e683284bf7f1ad660a720fe44d28b50bbde271e3566c206fccfb477f83574f"
},
{
"index": 2,
"operation": "DROP",
"category": "schema-change",
"readOnly": false,
"targetObjects": [
"legacy_accounts"
],
"referencedTables": [
"legacy_accounts"
],
"sourceTables": [],
"hasWhere": false,
"hasLimit": false,
"parameterCount": 0,
"normalizedPreview": "DROP TABLE legacy_accounts",
"statementSha256": "c615e71efb1c5674600d6dbf4b0e0af17581ca6e7daec6491bbf2c93eaf3432e"
}
],
"findings": [
{
"rule": "unfiltered_update",
"severity": "high",
"statementIndex": 1,
"message": "UPDATE has no restrictive WHERE predicate and can affect every matching row.",
"targetObjects": [
"accounts"
]
},
{
"rule": "drop_object",
"severity": "high",
"statementIndex": 2,
"message": "DROP removes a database object; verify backups, dependencies, and rollback steps.",
"targetObjects": [
"legacy_accounts"
]
},
{
"rule": "multi_change_without_transaction",
"severity": "medium",
"statementIndex": null,
"message": "Multiple change statements have no explicit BEGIN/COMMIT boundary; verify the target dialect's atomicity and migration runner behavior.",
"targetObjects": []
}
],
"parser": {
"name": "SQLGlot",
"version": "30.16.0",
"license": "MIT"
},
"execution": {
"databaseConnected": false,
"sqlExecuted": false
},
"limitations": [
"Static syntax review only; database schema, permissions, triggers, data volume, query plans, and runtime behavior are not inspected.",
"A low attention score does not prove a change is correct or safe to deploy."
]
},
"meta": {
"duration_ms": 42,
"cached": false,
"sources": [],
"warnings": []
}
}Try the payment challenge
curl -i -X POST 'https://apiacre.com/v1/developer/sql-change-review' \
-H 'content-type: application/json' \
--data '{"sql":"UPDATE accounts SET status = 'inactive'; DROP TABLE legacy_accounts;","dialect":"postgres"}'