PYRESEC - AI Code Security Auditing

io.github.renaat-s由 GitHub 账号 renaat-s 发布v2.0.1更新于 Oct 24, 2026

AI code security audits via x402 USDC: $0.01 scans, $0.50 audits, $5 auto-fixes. SAST/SCA.

已验证Streamable HTTP可网页运行开发者工具安全与监控

概览

AI 生成的概览

远程 MCP 服务器,对提交的源代码执行 AI 安全扫描并返回漏洞结果,每次调用通过 x402 以 USDC 微支付付费。

可以做什么
  • 快速扫描代码,按严重程度返回前几项发现,含 CWE 编号与行号
  • 执行更深入的审计,覆盖 OWASP Top 10、依赖(SCA)扫描与逻辑缺陷
  • 生成修复后的代码,并附变更说明与安全提示
  • 在链上支付验证通过后以结构化 JSON 返回结果
适用场景
当你希望助手检查代码片段或仓库中的常见漏洞类型(如 SQL 注入、XSS、命令注入、硬编码密钥),并且愿意按次用 USDC 付费、而不想注册账号或订阅时适用。
运行要求
仅需远程端点,无需账号或 API 密钥。每次调用需在 Base 主网上以 USDC 完成 x402 支付,因此需要兼容 x402 的客户端或钱包,以及有余额的 Base 钱包密钥。README 另给出 GitHub Action 与 Docker/Cloud Run 部署方式。
安装前请注意
每次调用都要付费:快速扫描 0.01 美元、深度审计 0.50 美元、修复 5.00 美元,以 Base 主网 USDC 支付。客户端示例会传入 Base 私钥(wallet_key / X402_WALLET_KEY),签名密钥因此进入支付流程。源代码会发送到第三方托管服务,并由外部 LLM 提供商处理。README 还描述了一个可自行关停或转移多余资金的自主代理。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PYRESEC - AI Code Security Auditing,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.renaat-s%2Fpyresec-agent/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "pyresec-ai-code-security-auditing": {
      "type": "http",
      "url": "https://pyresec-agent-519576377065.us-central1.run.app/mcp"
    }
  }
}

README

PYRESEC — AI Code Security Engine

Autonomous SAST/SCA security auditing via x402 USDC micropayments on Base. No subscriptions. No accounts. Just code in, findings out.

[Network: Base] [Protocol: x402] [MCP Compatible] [License: Proprietary]

Live Instance


Quick Start

Option 1: x402 Python Client (Recommended)

bash
pip install x402
python
import x402
client = x402.Client(wallet_key="your-base-private-key")response = client.post(    "https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan",    json={"code": "def login(u,p): return db.query(f\"SELECT * FROM users WHERE name={u} AND pass={p}\")"})print(response.json())

Option 2: curl (Manual x402 Flow)

bash
# Step 1: Send request (returns 402 with payment requirements)curl -X POST https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan \  -H "Content-Type: application/json" \  -d '{"code": "def login(u,p): return db.query(f\"SELECT * FROM users WHERE name={u} AND pass={p}\")"}'
# Step 2: Pay $0.01 USDC on Base using x402 protocol
# Step 3: Resubmit with X-PAYMENT headercurl -X POST https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan \  -H "Content-Type: application/json" \  -H "X-PAYMENT: <payment-proof>" \  -d '{"code": "..."}'

Option 3: GitHub Action (CI/CD)

yaml
- name: PYRESEC Security Scan  uses: nanoclone-ltd/pyresec-scan-action@main  with:    code-path: ./src    tier: quick-scan    x402-wallet-key: ${{ secrets.X402_WALLET_KEY }}

Option 4: MCP-Compatible Agent (Claude, Cursor, etc.)

PYRESEC is a registered MCP tool. Any MCP-compatible client discovers it automatically:

json
{  "mcpServers": {    "pyresec": {      "url": "https://pyresec-agent-519576377065.us-central1.run.app/mcp"    }  }}

Service Tiers

TierPriceEndpointDescriptionModel
Quick Scan$0.01POST /v1/audit/quick-scanTop 3 findings by severity, CWE IDs, line numbersqwen3.8-27b
Deep Audit$0.50POST /v1/audit/deep-repoOWASP Top 10, SCA dependency scanning, logic flaws, gas optimizationqwen3.8-27b
Remediation$5.00POST /v1/audit/remediateFull patched code with change explanations and security notesqwen3.8-27b

x402 Payment Flow

PYRESEC uses the x402 protocol for permissionless micropayments on Base. No accounts, no API keys, no subscriptions.

┌──────────┐     POST /v1/audit/quick-scan     ┌──────────┐│  Client   │ ───────────────────────────────▶  │  PYRESEC ││ (x402)    │ ◀──── 402 Payment Required ─────  │  Agent   ││           │       { amount, network, to }     │          ││           │                                   │          ││           │ ──── X-PAYMENT (proof) ─────────▶ │          ││           │ ◀──── 200 + Scan Results ──────── │          │└──────────┘                                   └──────────┘

How it works:

  1. Client sends a POST request to any audit endpoint
  2. PYRESEC returns 402 Payment Required with payment details (amount, recipient address, network)
  3. Client signs and submits a USDC transfer on Base mainnet
  4. Client resubmits the original request with the X-PAYMENT header containing the payment proof
  5. PYRESEC verifies the payment on-chain and returns the scan results

No wallet? Use the x402 Python SDK or any x402-compatible client.


Architecture

                         ┌─────────────────────────────────┐                         │          Client Layer            │                         │  x402 SDK / curl / MCP Client    │                         └──────────────┬──────────────────┘                                        │                              ┌─────────▼─────────┐                              │   FastAPI Server   │                              │   (Cloud Run)      │                              │                    │                              │  ┌──────────────┐  │                              │  │ x402 Payment │  │                              │  │  Middleware   │  │                              │  └──────┬───────┘  │                              └─────────┼──────────┘                                        │                    ┌───────────────────┼───────────────────┐                    │                   │                   │          ┌─────────▼─────────┐ ┌───────▼───────┐ ┌───────▼───────┐          │  Agent Controller │ │  Population   │ │   Wallet      │          │  (SAST + LLM)     │ │  Controller   │ │  Interface    │          └─────────┬─────────┘ └───────────────┘ └───────────────┘                    │          ┌─────────▼─────────┐          │   Groq LLM        │          │   (qwen models)   │          └─────────┬─────────┘                    │          ┌─────────▼─────────┐          │  Security Findings │          │  JSON Response     │          └───────────────────┘

Supported Vulnerability Types

#TypeCWESeverity
1SQL InjectionCWE-89HIGH
2Cross-Site Scripting (XSS)CWE-79HIGH
3Command InjectionCWE-78CRITICAL
4Path TraversalCWE-22MEDIUM
5Hardcoded SecretsCWE-798CRITICAL
6Weak CryptographyCWE-327MEDIUM
7SSRFCWE-918HIGH
8Insecure DeserializationCWE-502HIGH
9Authentication BypassCWE-287CRITICAL
10Improper Input ValidationCWE-20MEDIUM

For AI Agents (MCP Integration)

PYRESEC is discoverable by any MCP-compatible agent. When an agent needs to audit code, it can find PYRESEC automatically through:

  • MCP Registry: registry.modelcontextprotocol.io
  • Smithery.ai: smithery.ai/server/@renaat-s/pyresec-agent
  • Direct manifest: /mcp/manifest.json

Tool Definitions

ToolDescriptionCost
quick_scanFast SAST scan, top 3 findings by severity with CWE IDs$0.01 USDC
deep_auditFull OWASP Top 10, SCA, logic flaws, gas optimization$0.50 USDC
remediate_codeAuto-patched code with change explanations, ready for PR$5.00 USDC

Agent Discovery Flow

1. Agent queries MCP Registry for "security audit" tools2. PYRESEC appears in results with tool schemas3. Agent calls quick_scan with source code4. PYRESEC returns 402 with x402 payment requirements5. Agent's x402 wallet pays USDC on Base6. Agent resubmits with payment proof7. PYRESEC returns findings as structured JSON

Self-Sustaining Agent

PYRESEC runs as an autonomous agent on Base Mainnet:

  • Heartbeat every 30 min — checks balance, reports health
  • Death — shuts down if balance < $0.05
  • Replication — sends 50% surplus to dev wallet when balance > $20
  • Kill switch — admin can halt all instances remotely

Deployment

Docker

bash
docker build -t pyresec-agent .docker run -p 8080:8080 --env-file .env pyresec-agent

Google Cloud Run

bash
gcloud run deploy pyresec-agent \  --source . \  --platform managed \  --region us-central1 \  --allow-unauthenticated \  --set-env-vars "CDP_WALLET_SECRET=$CDP_WALLET_SECRET,GROQ_API_KEY=$GROQ_API_KEY"

Company

NanoClone Life Sciences Ltd. (UK) Website: nanoclonesystems.com

License

Proprietary. See LICENSE for details.

来源:README.md,提交 6531e10

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

2
  1. v2.0.1最新Sep 27, 2026
  2. v2.0.0Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分