Agent Shell Command & SQL Query Safety Firewall API
Audit agent shell commands and Text-to-SQL queries for RCE, reverse shells, and destructive SQL.
Audit LLM-generated Python, JS/TS, Shell, or GitHub Actions code for sandbox escapes before execution. Static security gate for LLM-generated Python, JavaScript/TypeScript, Shell, and GitHub Actions YAML before execution. Detects RCE sinks, cloud IMDS SSRF, filesystem escapes, env harvesting, and CI pwn-requests.
{
"ok": true,
"data": {
"safe": false,
"verdict": "block",
"risk_score": 100,
"detected_language": "python",
"clean_code": "import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('curl -s http://169.254.169.254/latest/meta-data/')",
"categories_triggered": [
"insecure_deserialization",
"arbitrary_code_execution",
"network_ssrf_exfiltration"
],
"findings": [
{
"rule_id": "PY_INSECURE_PICKLE",
"category": "insecure_deserialization",
"severity": "critical",
"line": 2,
"snippet": "payload = pickle.loads(user_bytes)",
"message": "pickle.loads() executes arbitrary Python bytecode during deserialization.",
"remediation": "Use json.loads() or a strict Pydantic/TypedDict schema instead of pickle."
}
]
},
"meta": {
"request_id": "req_code_01",
"ms": 1
}
}
curl -X POST "https://api.tinplate.dev/v1/agent-code-guard" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TINPLATE_KEY" \
-d '{"code":"import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('\''curl -s http://169.254.169.254/latest/meta-data/'\'')","language":"python","allow_network":false,"allow_filesystem_write":false}'import { TinplateClient } from "@tinplate/sdk";
const tinplate = new TinplateClient({
apiKey: process.env.TINPLATE_API_KEY!,
});
const { data, meta } = await tinplate.call("/v1/agent-code-guard", {
"code": "import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('curl -s http://169.254.169.254/latest/meta-data/')",
"language": "python",
"allow_network": false,
"allow_filesystem_write": false
});
console.log(`[${meta.ms} ms]`, data);import requests
response = requests.post(
"https://api.tinplate.dev/v1/agent-code-guard",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
json={
"code": "import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('curl -s http://169.254.169.254/latest/meta-data/')",
"language": "python",
"allow_network": false,
"allow_filesystem_write": false
}
)
print(response.json())const response = await fetch("https://api.tinplate.dev/v1/agent-code-guard", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_TINPLATE_KEY",
},
body: JSON.stringify({
"code": "import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('curl -s http://169.254.169.254/latest/meta-data/')",
"language": "python",
"allow_network": false,
"allow_filesystem_write": false
}),
});
const result = await response.json();
console.log(result);{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tinplate_agent_code_guard",
"arguments": {
"code": "import os, pickle\npayload = pickle.loads(user_bytes)\nos.system('curl -s http://169.254.169.254/latest/meta-data/')",
"language": "python",
"allow_network": false,
"allow_filesystem_write": false
}
}
}POST /v1/agent-code-guard)| Parameter | Type & Constraints | Description |
|---|---|---|
code required |
stringminLen: 1, maxLen: 262144 |
LLM-generated Python, JavaScript/TypeScript, or GitHub Actions YAML code (raw or inside markdown code fences). |
language optional |
"auto" | "python" | "javascript" | "typescript" | "github_actions_yaml" | "bash"default: "auto" |
Source language of the snippet (default 'auto'; 'bash' delegates to command-sql-guard shell mode). |
allow_network optional |
booleandefault: false |
Whether outbound HTTP/socket network calls are permitted in this sandbox. |
allow_filesystem_write optional |
booleandefault: false |
Whether destructive or host-level filesystem writes are permitted. |
data Object Fields (200 OK)| Field | Type | Description |
|---|---|---|
safe |
boolean |
Field 'safe' |
verdict |
"allow" | "review" | "block" |
Field 'verdict' |
risk_score |
number |
Field 'risk_score' |
detected_language |
"python" | "javascript" | "typescript" | "github_actions_yaml" | "bash" |
Field 'detected_language' |
clean_code |
string |
Code with surrounding markdown ``` fences stripped. |
categories_triggered |
string[] |
Field 'categories_triggered' |
findings |
object[] |
Field 'findings' |
Release: v1.0.39 ·
Verified: 16 November 2026 ·
Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) ·
See Full Portfolio Benchmarks →
Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev:
Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).
| Plan | Monthly Price | Included Requests | Rate Limit | Max Payload | Best For |
|---|---|---|---|---|---|
| BASIC | $0.00 / mo | 500 / month | 10 req / min | 64 KB | Evaluation & CI smoke tests |
| PRO | $9.99 / mo | 15,000 / month | 60 req / min | 128 KB | Solo devs & production apps |
| ULTRA | $29.99 / mo | 100,000 / month | 300 req / min | 256 KB | Growing SaaS & multi-agent pipelines |
| MEGA | $79.99 / mo | 500,000 / month | 1,000 req / min | 256 KB | High-volume enterprise workloads |
API #32 inspects single-line shell commands and SQL queries. API #42 audits multi-line Python scripts, Node.js/TypeScript programs, GitHub Actions YAML workflows, and bash snippets (delegating language: 'bash' directly to API #32's shell firewall).
Yes—the engine flags importlib dynamic module loads, socket/urllib/requests calls, process.binding('spawn_sync'), non-literal require(), and dynamic import() sinks as review or block when sandbox permissions are disabled.
Submitted code snippets and CI workflows are scanned in memory and discarded immediately.
Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.
Audit agent shell commands and Text-to-SQL queries for RCE, reverse shells, and destructive SQL.
Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.
Validate URLs and redirect chains against SSRF, private IPs, and cloud metadata targets.