73trust / 100

Code Scan

by Code security scan: secrets, vul in Security & trust

x402 APIFailing, checked 2 h ago

Security audit of a code snippet: static scan for hardcoded secrets (AWS, API and private keys, DB passwords), eval/exec, command injection, HTTP calls with no timeout, weak hashes (md5/sha1), bare except and unverified JWT. One entry per finding with rule, severity, exact line number and a suggested fix. Rule-based, no LLM: same snippet, same findings. Send Python or JavaScript as text. Use it as a code review or vulnerability scanner for AI-generated code before shipping. Not a formal audit.

POST
https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan
Price
$1.00
per call in USDC
Uptime
87.6%
last 30 days
Response time
499 ms
909 ms slowest 5%
Last check
Failed
2 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 2 h ago: Expected HTTP 402, got 405

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan

Each call costs $1.00 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan
content-type: application/json

{
  "code": "import hashlib\nAPI_KEY = 'sk-live-9f2b7c41a8de5f60b3c2'\ndef h(p):\n    return hashlib.md5(p.encode()).hexdigest()\n",
  "language": "python"
}

Example response

The provider's example. We can't check it without paying.

Example response, 30 lines
{
  "counts": {
    "high": 1,
    "medium": 1
  },
  "engine": "rule-based-static (no LLM)",
  "findings": [
    {
      "evidence": "API_KEY = 'sk-liv...b3c2'",
      "fix": "move the value into an environment variable and rotate the credential",
      "issue": "hardcoded credential",
      "line": 2,
      "rule": "hardcoded-secret",
      "severity": "high"
    },
    {
      "evidence": "",
      "fix": "use sha256 or stronger (and a salt for passwords)",
      "issue": "cryptographically weak hash",
      "line": 4,
      "rule": "weak-hash",
      "severity": "medium"
    }
  ],
  "language": "python",
  "lines_scanned": 4,
  "risk": "high",
  "scope_note": "Static rule-based analysis. Not a formal audit and not a penetration test.",
  "total": 2
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $1.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan' \
  -H 'content-type: application/json' \
  --data-raw '{"code":"import hashlib\nAPI_KEY = '\''sk-live-9f2b7c41a8de5f60b3c2'\''\ndef h(p):\n    return hashlib.md5(p.encode()).hexdigest()\n","language":"python"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan' \
  -H 'content-type: application/json' \
  --data-raw '{"code":"import hashlib\nAPI_KEY = '\''sk-live-9f2b7c41a8de5f60b3c2'\''\ndef h(p):\n    return hashlib.md5(p.encode()).hexdigest()\n","language":"python"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $1 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$1" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $1 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ffachada.chelsea-hermes.workers.dev%2Fscan%2Fv1%2Fcode%2Fscan&method=POST
const res = await pay("https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "code": "import hashlib\nAPI_KEY = 'sk-live-9f2b7c41a8de5f60b3c2'\ndef h(p):\n    return hashlib.md5(p.encode()).hexdigest()\n",
    "language": "python"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $1 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$1"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://fachada.chelsea-hermes.workers.dev/scan/v1/code/scan",
        json={
            "code": "import hashlib\nAPI_KEY = 'sk-live-9f2b7c41a8de5f60b3c2'\ndef h(p):\n    return hashlib.md5(p.encode()).hexdigest()\n",
            "language": "python",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

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

Recent checks

WhenResultHTTPTimePrice
2 h agoExpected HTTP 402, got 40540589 ms-
13 h agoPassed402422 ms$1.00
25 h agoPassed402423 ms$1.00
3 days agoTimed out---
4 days agoTimed out---
Show 10 older checks
5 days agoPassed402530 ms$1.00
5 days agoPassed402513 ms$1.00
6 days agoPassed402811 ms$1.00
6 days agoPassed402505 ms$1.00
6 days agoExpected HTTP 402, got 530530145 ms-
7 days agoPassed402594 ms$1.00
7 days agoPassed402552 ms$1.00
7 days agoPassed402592 ms$1.00
8 days agoPassed402484 ms$1.00
8 days agoPassed402445 ms$1.00