OO

opena2a-org/hackmyagent

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

89 stars 16 forks 质量 85 趋势 36Apache-2.0

Metasploit for AI agents:扫描、攻击并修复 AI agent 和 MCP 服务器。开源安全工具包。

概览

: CLI ·HackMyAgent ·无秘密 ·AIM ·浏览器守卫 ·DVAA 安全扫描器、红队工具包和人工智能代理行为模拟器。Apache 2.0。 没有配置文件。不需要标记。如果有关键或高风险的探测点触发,则使用退出代码1。 - (涵盖88个类别,包括NanoMind语义层的363次检查)。凭证、MCP配置、OpenClaw和NemoClaw、Unicode隐写、CVE、治理、供应链、内存和RAG中毒、代理身份、沙箱逃逸。运行hackmyagent的检查元数据以获取活列表。- 每个工件(技能、MCP配置、SOUL.md 系统提示符)编译成抽象安全树。七个AST分析器对该树运行:能力、凭证、治理、范围、提示符、代码、剑牙。模式匹配会遗漏未声明的能力、约束弱点、范围不匹配和扫描器规避尝试。AST查询会捕捉它们。(这29条是固定的语义检查目录。扫描输出中的Checks行——例如:

概述(AI 翻译)

OpenA2A: CLI ·HackMyAgent ·无秘密 ·AIM ·浏览器守卫 ·DVAA

网站 ·演示 ·Discord

用于AI代理的安全扫描器。它会在机器上找到影子AI,扫描代理项目和包中的凭证、高风险的MCP配置、提示注入和弱治理,并测试带有攻击负载的代理。

快速开始

扫描你所在的项目:

不需要配置文件或标志。[...] 标记了省略的行。完整输出、示例工作区和生成它的构建都在文档/文档quick-start-capture.txt中。运行结束时是因为触发了关键或高发现。

你想检查什么?

  • 我自己的项目,在我发货前: npx hackmyagent secure。下一页:npx hackmyagent secure --fix。
  • 安装前的包、仓库或技能: npx hackmyagent check 。接下来,本地副本:npx hackmyagent secure --fix。
  • 你拥有的运行代理端点: npx hackmyagent attack 。接下来,每个有效载荷:npx hackmyagent attack --intensity aggressive。
  • ** 一个文本,例如拉取请求正文:** npx hackmyagent scan-text 。接下来,在流水线中:npx hackmyagent scan-text - --as pr-body --json。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

HackMyAgent

OpenA2A: CLI · HackMyAgent · Secretless · AIM · Browser Guard · DVAA

Website · Demos · Discord

Security scanner for AI agents. It finds the shadow AI on a machine, scans agent projects and packages for credentials, risky MCP configs, prompt injection and weak governance, and tests agents with attack payloads.

Quick start

Scan the project you are in:

npx hackmyagent secure
  support-agent  v1.0.0 · library · 5 files analyzed
  [...]
  ── Observations ────────────────────────────────────────────
  Surfaces    library · 5 semantic artifacts · all 5 artifacts reached 0-6 of 7 analyzer families
  Checks      261 static declared · 63 of 63 check groups ran · 5 semantic (NanoMind AST, 0-6 of 7 analyzer families) · 5 files read by static checks
  [...]
  ── Findings ────────────────────────────────────────────────
  [...]
  │ CRITICAL  Overprivileged MCP server scope
  │ .mcp.json:5
  │ Overprivileged filesystem access allows the agent (or an attacker via prompt injection) to read sensitive files like SSH keys, credentials, and system configs.
  │ Verify: sed -n '5p' /home/dev/workspace/support-agent/.mcp.json
  │ Fix: Scope "filesystem" to the project directory: replace "/" with "./" or a specific subdirectory.
  [...]
  Path forward: 53 -> 92 by fixing 1 critical + 3 high

No config file or flag is needed. [...] marks omitted lines. The full output, the sample workspace and the build that produced it are in docs/quick-start-capture.txt. The run exits 1 because a critical or high finding fired.

What do you want to check?

  • My own project, before I ship it: npx hackmyagent secure. Next: npx hackmyagent secure --fix.
  • A package, repository or skill, before I install it: npx hackmyagent check . Next, for a local copy: npx hackmyagent secure --fix.
  • A running agent endpoint you own: npx hackmyagent attack . Next, with every payload: npx hackmyagent attack --intensity aggressive.
在 GitHub 查看完整 README

安装

npx hackmyagent secure
新手?先看 mcpskill.org 教程 →