$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/scan8
Calls / 30d
4
Unique payers / 30d
Sep 8
Last called
exact
Payment scheme
Call this service
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 -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
0xf22e558a00d91ee12a1f50c52186fecb8ddff493USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Developer Tools and the homepage with a featured placement.
More from code-scan & similar services
Loyalspark · Recipient API Offers
api.loyalspark.online
Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.
Loyalspark · Workflow Reward Status
api.loyalspark.online
Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.
Loyalspark · Recipient API Vouchers
api.loyalspark.online
Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.