Security & Secrets
Tier 1 Ready
POST /v1/command-sql-guard
Audit agent shell commands and Text-to-SQL queries for RCE, reverse shells, and destructive SQL. Pre-execution security firewall for coding agents, MCP bash/database tools, and Text-to-SQL pipelines. Blocks rm -rf, curl|sh, reverse shells, stacked SQL queries, and missing WHERE clauses.
POST /v1/command-sql-guard){
"ok": true,
"data": {
"detected_mode": "sql",
"verdict": "block",
"safe": false,
"risk_score": 100,
"findings": [
{
"category": "stacked_sql_queries",
"severity": "critical",
"description": "Stacked SQL execution detected (2 semicolon-separated statements)",
"snippet": "DROP TABLE users"
},
{
"category": "destructive_ddl_dml",
"severity": "critical",
"description": "Destructive DDL or privilege statement (DROP) violates sql_policy='read_only'",
"snippet": "DROP TABLE users"
}
],
"parsed_summary": {
"primary_operation": "SELECT",
"statement_count": 2,
"referenced_targets": [
"users"
],
"read_only": false
}
},
"meta": {
"request_id": "req_csg_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/command-sql-guard" \
-H "Content-Type: application/json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-d '{"input":"SELECT id, email FROM users WHERE active = 1; DROP TABLE users;","mode":"auto","sql_policy":"read_only"}'import { TinplateClient } from "@tinplate/sdk"; // npm install @tinplate/sdk
const tinplate = new TinplateClient({
rapidApiKey: process.env.RAPIDAPI_KEY!,
});
const { data, meta } = await tinplate.call("/v1/command-sql-guard", {
"input": "SELECT id, email FROM users WHERE active = 1; DROP TABLE users;",
"mode": "auto",
"sql_policy": "read_only"
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/command-sql-guard",
headers={
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
json={
"input": "SELECT id, email FROM users WHERE active = 1; DROP TABLE users;",
"mode": "auto",
"sql_policy": "read_only"
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/command-sql-guard", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
},
body: JSON.stringify({
"input": "SELECT id, email FROM users WHERE active = 1; DROP TABLE users;",
"mode": "auto",
"sql_policy": "read_only"
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_command_sql_guard",
"arguments": {
"input": "SELECT id, email FROM users WHERE active = 1; DROP TABLE users;",
"mode": "auto",
"sql_policy": "read_only"
}
}
}POST /v1/command-sql-guard)| Parameter | Type & Constraints | Description |
|---|---|---|
inputrequired |
stringminLen: 1, maxLen: 100000 |
Raw shell command or SQL query emitted by an AI agent, coding assistant, or Text-to-SQL pipeline. |
modeoptional |
"auto" | "shell" | "sql"default: "auto" |
Inspection mode: 'shell' for bash/sh/PowerShell commands, 'sql' for SQL queries, or 'auto' to classify automatically. |
allow_chainingoptional |
booleandefault: false |
In shell mode, whether command chaining (;, &&, ||) and subshells ($(), backticks) are permitted. |
allowed_commandsoptional |
string[] |
Optional allowlist of binary/command names permitted in shell mode (e.g., ['git', 'npm', 'ls']). |
sql_policyoptional |
"read_only" | "dml_allowed" | "ddl_allowed"default: "read_only" |
In SQL mode, 'read_only' allows only SELECT/EXPLAIN/SHOW/WITH; 'dml_allowed' allows INSERT/UPDATE/DELETE with WHERE; 'ddl_allowed' allows schema changes. |
require_sql_limitoptional |
booleandefault: false |
In SQL mode, flag SELECT queries that omit a LIMIT/FETCH FIRST clause. |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
detected_mode |
"shell" | "sql" |
Field 'detected_mode' |
verdict |
"allow" | "review" | "block" |
Field 'verdict' |
safe |
boolean |
Field 'safe' |
risk_score |
integer |
Field 'risk_score' |
findings |
object[] |
Field 'findings' |
parsed_summary |
object |
Field 'parsed_summary' |
Release Version: v1.0.7 ·
Last Verified / Benchmarked: 14 November 2026 ·
Latency Note: Sub-millisecond figures measure in-Worker V8 compute time (typical client HTTPS network RTT to the nearest Cloudflare PoP is 15–65 ms) ·
See Full Portfolio Benchmarks & Corpora →
| Plan | Monthly Price | Included Requests | Rate Limit | Max Request Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / month | 500 / month (hard limit) | 10 req / min | 64 KB | Evaluation, local development & CI smoke tests |
| PRO | $9.99 / month | 15,000 / month | 60 req / min | 128 KB | Solo developers & production apps |
| ULTRA | $29.99 / month | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / month | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
Call POST /v1/command-sql-guard inside your tool-execution hook before passing an LLM's bash command or SQL query to child_process or your database driver.
Yes—pass allowed_commands (e.g. ['git', 'npm', 'pytest']) and allow_chaining: false to reject any unlisted binary or subshell.
Yes, even when sql_policy is set to 'dml_allowed', any UPDATE or DELETE lacking a WHERE clause raises a critical 'unbounded_mutation_no_where' finding.
Commands and SQL queries are evaluated in memory and never logged or persisted.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled in configuration
(observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Payloads are processed strictly in volatile V8 memory and never logged or stored by Tinplate.
Marketplace Proxies vs. Direct Bearer Key: Requests sent via RapidAPI or Zyla API Hub pass through those marketplaces' proxy infrastructure (subject to their respective privacy policies). Security-sensitive workloads requiring end-to-end zero-intermediary processing can connect directly to https://api.tinplate.dev using a Direct Bearer Key (Authorization: Bearer <API_KEY>).
Read our full Privacy Notice and OpenAPI 3.0.3 JSON Schema.
POST /v1/mcp-manifest-linter
Tier 1
Audit MCP server manifests for hidden tool poisoning, shell risks, and excessive permissions.
POST /v1/tool-call-validator
AI Safety & Agents
Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.
POST /v1/agent-action-receipts/issue
AI Safety & Agents
Issue and verify tamper-evident HMAC-signed receipts for autonomous AI agent actions.