C

code-scan · Code Scan

by code-scan

POSTBase

$0.02

per call · USD Coin on Base

Static application-security scan of source code or a git-diff for CWE Top-25 logic bugs: SQL injection, XSS, command injection, code and template injection, SSRF, path traversal, insecure deserialization, weak crypto, insecure randomness, open redirect and XXE across Python, JavaScript, TypeScript, Java and Go. Returns a go/no-go verdict with per-finding CWE, severity, file and line. Static indicators, not a guarantee.

Endpoint

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

8

Calls / 30d

4

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://api.agentstools.dev/code/scan", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "diff": "--- a/db.py\n+++ b/db.py\n@@ -1,2 +1,3 @@\n import sqlite3\n+def f(cur, uid):\n+    cur.execute(f\"SELECT * FROM users WHERE id = {uid}\")\n"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://api.agentstools.dev/code/scan" \
  -H "Content-Type: application/json" \
  -d '{"diff":"--- a/db.py\n+++ b/db.py\n@@ -1,2 +1,3 @@\n import sqlite3\n+def f(cur, uid):\n+    cur.execute(f\"SELECT * FROM users WHERE id = {uid}\")\n"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "added_lines_scanned": 2,
  "coverage": {
    "cwe_flagged": [
      "CWE-89"
    ],
    "cwe_total": 12,
    "languages_scanned": [
      "python"
    ]
  },
  "disclaimer": "Automated static security indicators, not a guarantee.",
  "files_scanned": 1,
  "findings": [
    {
      "confidence": "high",
      "cwe": "CWE-89",
      "dimension": "injection",
      "evidence": "cur.execute(f\"SELECT * FROM users WHERE id = {uid}\")",
      "file": "db.py",
      "line": 3,
      "name": "SQL Injection",
      "reason": "User-controlled data appears to be interpolated into a SQL query.",
      "severity": "high"
    }
  ],
  "findings_by_cwe": {
    "CWE-89": 1
  },
  "object": "code_scan",
  "risk_score": 30,
  "ruleset_version": "2026.07.16",
  "verdict": "block"
}

Payment details

Pay to0xf22e558a00d91ee12a1f50c52186fecb8ddff493
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from code-scan & similar services