Support: support@tinplate.dev · Zero-Retention Edge Security Support Trust Center DPA GitHub Issues
AI Data Prep Live on Hub

AI-Generated Code & GitHub Actions Workflow Sandbox Security Auditor API

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.

Interactive Sandbox · No API Key Required 200 OK · Ready
POST /v1/agent-code-guardinput
200 OK sample / live responsejson
{
  "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
  }
}
OpenAPI 3.0.3 Get All-Access Key ($29/mo) No signup. No payload storage.
Quickstart Code Examples
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
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/agent-code-guard)

ParameterType & ConstraintsDescription
code required string
minLen: 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 boolean
default: false
Whether outbound HTTP/socket network calls are permitted in this sandbox.
allow_filesystem_write optional boolean
default: false
Whether destructive or host-level filesystem writes are permitted.

Response data Object Fields (200 OK)

FieldTypeDescription
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'

What AI-Generated Code & CI Workflow Sandbox Auditor API Detects & Validates

  • Python & JS/TS sandbox escapes: os.system, subprocess, pty.spawn, pickle/yaml.load, __subclasses__(), child_process, process.binding, and vm.runInNewContext
  • Cloud IMDS credential theft (169.254.169.254, metadata.google.internal), sensitive filesystem reads (/etc/shadow, .ssh/id_rsa, /proc/self/environ), and reverse shells
  • GitHub Actions CI workflow vulnerabilities: pull_request_target pwn-requests and untrusted ${{ github.event.* }} expression injection inside run: blocks
  • Configurable sandbox policy toggles (allow_network, allow_filesystem_write) plus language ('auto', 'python', 'javascript', 'typescript', 'github_actions_yaml', 'bash')
Honest Engineering Boundaries

Known Limitations & Test Verification

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 →

  • Performs deterministic AST-pattern and token inspection in <2 ms; heavily obfuscated runtime string concatenation should still be executed inside an isolated microVM or gVisor container.
  • Tested v1.0.33 (16 November 2026).

Direct All-Access & Marketplace Plans

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).

PlanMonthly PriceIncluded RequestsRate LimitMax PayloadBest For
BASIC$0.00 / mo500 / month10 req / min64 KBEvaluation & CI smoke tests
PRO$9.99 / mo15,000 / month60 req / min128 KBSolo devs & production apps
ULTRA$29.99 / mo100,000 / month300 req / min256 KBGrowing SaaS & multi-agent pipelines
MEGA$79.99 / mo500,000 / month1,000 req / min256 KBHigh-volume enterprise workloads

Frequently Asked Questions

How is this different from API #32 (Command & SQL Guard)?

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).

Does allow_network: false catch dynamic Python socket and JavaScript child_process patterns?

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.

Zero Payload Logging

Data Handling, Privacy & Proxy Disclosure

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.

Related Tinplate APIs

POST /v1/command-sql-guard Tier 1

Agent Shell Command & SQL Query Safety Firewall API

Audit agent shell commands and Text-to-SQL queries for RCE, reverse shells, and destructive SQL.

POST /v1/tool-call-validator AI Safety & Agents

Agent Tool-Call Validator & Repairer API

Validate and auto-repair broken LLM tool-call arguments against your JSON Schema.

POST /v1/ssrf-firewall Security & Secrets

Agent URL & SSRF Firewall API

Validate URLs and redirect chains against SSRF, private IPs, and cloud metadata targets.