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 分