/ 目錄 / 演練場 / claude-cybersecurity
● 社群 AgriciDaniel ⚡ 即開即用

claude-cybersecurity

作者 AgriciDaniel · AgriciDaniel/claude-cybersecurity

防禦性程式碼審查技能:8 個平行代理涵蓋漏洞、授權、機密、供應鏈、IaC、威脅情報、AI 程式碼模式與業務邏輯缺陷——符合 OWASP 2025 + CWE Top 25 + MITRE。

為 Claude Code 打造的零設定防禦性資安審查工具。部署 8 個專業代理平行執行,涵蓋漏洞偵測、授權檢查、機密掃描、供應鏈、IaC、威脅情報(惡意程式/C2/後門模式)、AI 產生的程式碼模式,以及業務邏輯缺陷。對應 OWASP 2025、CWE Top 25、MITRE ATT&CK、PCI-DSS。支援 11 種以上程式語言,除 Claude Code 外無需額外相依套件。作為 GitHub Advanced Security 的補充(而非取代)。

為什麼要用

核心特性

即時演示

實際使用效果

claude-cybersecurity-skill.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "claude-cybersecurity-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/AgriciDaniel/claude-cybersecurity",
        "~/.claude/skills/claude-cybersecurity"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "claude-cybersecurity-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/AgriciDaniel/claude-cybersecurity",
        "~/.claude/skills/claude-cybersecurity"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "claude-cybersecurity-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/AgriciDaniel/claude-cybersecurity",
        "~/.claude/skills/claude-cybersecurity"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "claude-cybersecurity-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/AgriciDaniel/claude-cybersecurity",
        "~/.claude/skills/claude-cybersecurity"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "claude-cybersecurity-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/AgriciDaniel/claude-cybersecurity",
        "~/.claude/skills/claude-cybersecurity"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "claude-cybersecurity-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/AgriciDaniel/claude-cybersecurity",
          "~/.claude/skills/claude-cybersecurity"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add claude-cybersecurity-skill -- git clone https://github.com/AgriciDaniel/claude-cybersecurity ~/.claude/skills/claude-cybersecurity

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: claude-cybersecurity

新服務上線前的資安審查

👤 工程團隊,在部署至正式環境前使用 ⏱ ~60 min intermediate

何時使用: 在含有新服務或大幅變更服務的版本發布前執行。

前置條件
  • 已安裝技能 — git clone https://github.com/AgriciDaniel/claude-cybersecurity ~/.claude/skills/claude-cybersecurity
步驟
  1. 執行完整的 8 代理掃描
    Use claude-cybersecurity on services/payment. Full pass — vulns, authz, secrets, supply chain, IaC, business logic.✓ 已複製
    → 報告依代理分類列出發現項目,包含嚴重等級與 OWASP/CWE 對應
  2. 分流並指派處理
    Group by severity. For each critical/high, draft a GitHub issue with reproduction steps.✓ 已複製
    → 可直接貼上的 Issue 草稿

結果: 取得有憑有據的上線前安全簽核,並留下完整的處理記錄。

注意事項
  • 自動將業務邏輯標記視為誤報 — 這些正是靜態工具會遺漏的問題——請仔細閱讀兩遍
搭配使用: github · repo-forensics-skill

審查 AI 產生的程式碼常見錯誤

👤 大量接受 Copilot/Claude/Cursor 產生的 PR 程式碼的團隊 ⏱ ~45 min intermediate

何時使用: 審核已合併或待審的 AI 輔助 PR 時使用。

步驟
  1. 專注執行 AI 程式碼代理
    Use claude-cybersecurity — ai-code patterns only. Flag: hallucinated middleware, plausible-but-wrong crypto, trust-all defaults.✓ 已複製
    → 針對特定模式的標記結果
  2. 交叉比對授權標記
    Now run the authorization agent — AI tends to miss role checks on non-happy paths.✓ 已複製
    → 顯示授權缺口的授權矩陣

結果: 在 AI 產生的常見錯誤類型流入正式環境前即時攔截。

搭配使用: github

掃描基礎設施即程式碼中的危險預設值

👤 平台團隊 ⏱ ~30 min intermediate

何時使用: 在合併 Terraform/K8s/CloudFormation 變更前執行。

步驟
  1. 執行 IaC 代理
    Use claude-cybersecurity IaC agent on terraform/ — flag public S3, open security groups, privileged pods.✓ 已複製
    → 含嚴重等級與修正差異的錯誤設定清單

結果: 在部署至叢集前確保 IaC 設定符合安全要求。

掃描相依套件中的惡意程式/C2/後門模式

👤 負責審核第三方程式碼的資安工程師 ⏱ ~30 min intermediate

何時使用: 引入新相依套件,或遭遇可疑的套件更新時使用。

步驟
  1. 執行威脅情報代理
    Run claude-cybersecurity threat-intel on node_modules — known malicious patterns.✓ 已複製
    → 模式比對結果(或顯示無異常)

結果: 在惡意套件滲入前提前預警。

注意事項
  • 對混淆過的合法函式庫產生誤報(例如壓縮後的 SDK) — 與已發布的原始碼交叉比對;不要直接自動移除
搭配使用: repo-forensics-skill

組合

與其他 MCP 搭配,撬動十倍槓桿

claude-cybersecurity-skill + repo-forensics-skill

將供應鏈與安裝時期審核和應用程式層級程式碼審查疊加使用

Run repo-forensics on the dep tree, then claude-cybersecurity on our app code.✓ 已複製
claude-cybersecurity-skill + github

自動為每個高嚴重等級的發現建立 Issue

After the review, open a GitHub issue per high finding with CWE + remediation.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
agent_vulns code path 標準審查 0
agent_authz code path 多角色應用程式 0
agent_secrets code path 任何情況都應執行 0
agent_supply_chain manifest files 相依套件更新時 0
agent_iac iac dir 基礎設施 PR 時 0
agent_threat_intel code/deps path 第三方程式碼審核時 0
agent_ai_code code path AI 輔助的 PR 時 0
agent_business_logic code path, domain hints 高信任度業務流程(付款、驗證)時 0

成本與限制

運行它的成本

API 配額
None
每次呼叫 Token 數
較高——8 個代理平行執行
費用
Free
提示
盡可能將範圍縮限至 PR 的差異部分,而非整個儲存庫

安全

權限、密鑰、影響範圍

最小權限: Read on the code under review
憑證儲存: 不儲存任何憑證
資料出站: 除 LLM 呼叫外不傳出任何資料——發現結果保留在本地
切勿授予: Write access to the audited repo during review

故障排查

常見錯誤與修復

Too many findings to process

先以 severity=high,critical 篩選;其餘部分再逐步處理

Agent mislabels framework conventions as vulns

提供框架背景資訊:「這是 Rails 專案,已使用 strong_params」

替代方案

claude-cybersecurity 對比其他方案

替代方案何時用它替代權衡
repo-forensics需要安裝時期或供應鏈審核,而非應用程式程式碼審查時威脅模型不同
GitHub Advanced Security (CodeQL)需要將 SAST 整合至 PR 工作流程時無法偵測業務邏輯問題與 AI 產生的程式碼模式

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills