82trust / 100

Code Inspect

by code-inspect in Developer tools

x402 APIPassing, checked 3 h ago

Static application-security scan of a single code blob for CWE Top-25 logic bugs (SQL injection, XSS, command injection, SSRF, path traversal, insecure deserialization, weak crypto and more). Pass the code and its language; returns a verdict with per-finding CWE, severity and line. Static indicators, not a guarantee.

POST https://api.agentstools.dev/code/inspect

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
28 ms typical, 28 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.agentstools.dev/code/inspect" \
  -H "content-type: application/json" \
  -d '{"code":"import hashlib\nh = hashlib.md5(data).hexdigest()\n","language":"python"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.agentstools.dev%2Fcode%2Finspect
const res = await pay("https://api.agentstools.dev/code/inspect", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"code":"import hashlib\nh = hashlib.md5(data).hexdigest()\n","language":"python"}),
});
console.log(await res.json());

Example input

{
  "code": "import hashlib\nh = hashlib.md5(data).hexdigest()\n",
  "language": "python"
}

Example output

{
  "coverage": {
    "cwe_flagged": [
      "CWE-327"
    ],
    "cwe_total": 12,
    "languages_scanned": [
      "python"
    ]
  },
  "disclaimer": "Automated static security indicators, not a guarantee.",
  "files_scanned": 1,
  "findings": [
    {
      "confidence": "high",
      "cwe": "CWE-327",
      "dimension": "weak_crypto",
      "evidence": "h = hashlib.md5(data).hexdigest()",
      "line": 2,
      "name": "Weak Cryptography",
      "reason": "A broken/weak cryptographic primitive is used (MD5).",
      "severity": "medium"
    }
  ],
  "findings_by_cwe": {
    "CWE-327": 1
  },
  "language": "python",
  "object": "code_inspect",
  "risk_score": 14,
  "ruleset_version": "2026.07.16",
  "verdict": "caution"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40228 ms$0.008