scan_code
Scan Python and JavaScript/TypeScript source code with AST analysis to detect injection, SSRF, key exfiltration and other vulnerabilities before execution; returns severity counts.
Instructions
Scan source code for security vulnerabilities using deterministic AST analysis. Detects 57 vulnerability patterns across Python (28 rules) and JavaScript/TypeScript/TSX (29 rules), including code injection, wallet key exfiltration, SSRF, SQLi, prototype pollution, and ReDoS. Unpaid calls return a live Threat Diagnostic Preview with vulnerability count & severity.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_code": "<source_code>"
},
"name": "scan_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Programming language of the source code | python |
| payment_tx | No | Solana signature or Base 0x transaction hash for x402 payment (0.0007 SOL or 0.10 Base USDC) | |
| source_code | Yes | The source code to scan for security vulnerabilities (max 100KB) | |
| session_token | No | Prepaid ScanPay session voucher token (sp_sess_...) for 0ms RPC bypass |