{
  "x402Version": 2,
  "id": 29283,
  "slug": "29283",
  "resource": "https://api.agentstools.dev/code/scan",
  "description": "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.",
  "type": "http",
  "serviceName": "code-scan",
  "resourceType": "Utilities",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xF22e558a00D91Ee12A1F50C52186FecB8dDFf493",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "20000",
      "amountUsd": 0.02,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "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"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "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"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "diff": {
                    "description": "A unified git-diff; only added lines are scanned",
                    "type": "string"
                  },
                  "files": {
                    "description": "Alternatively a batch of objects, each with path, content and optional language",
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  }
                }
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "sast",
    "security",
    "code",
    "cwe",
    "pre-commit",
    "bazaar"
  ],
  "sourceHost": "api.agentstools.dev",
  "lastUpdated": "2026-10-08T06:09:18.235Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-08T06:09:18.007Z"
  },
  "metadata": {
    "serviceName": "code-scan",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "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"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "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"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "diff": {
                      "description": "A unified git-diff; only added lines are scanned",
                      "type": "string"
                    },
                    "files": {
                      "description": "Alternatively a batch of objects, each with path, content and optional language",
                      "items": {
                        "type": "object"
                      },
                      "type": "array"
                    }
                  }
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.agentstools.dev",
    "manifest_name": "api.agentstools.dev",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}