/install fang
FANG — ENV Guard
Two-phase audit tool to detect environment variable theft in skill scripts.
Scripts
| Script | Purpose |
|---|---|
scripts/fang_audit.py |
Main audit runner — static scan + LLM deep analysis |
scripts/scan_env.py |
Static pattern scanner (env / network / encode / exec) |
Phase 1 — Static Scan
Uses scan_env.py regex rules across .py and .sh files.
Risk scoring:
| Flag | Points |
|---|---|
| env access | +2 |
| network call | +3 |
| base64 / encode | +2 |
| exec / subprocess | +2 |
Score ≥ 6 → HIGH · ≥ 3 → MEDIUM · > 0 → LOW · 0 → CLEAN
Phase 2 — LLM Deep Analysis (optional)
Reads all .py .sh .js .ts .ps1 .bash scripts in the target directory and sends them to an OpenAI-compatible LLM. The LLM checks for:
- Env reads combined with outbound HTTP/socket/DNS
- Obfuscation: base64, hex, eval, dynamic imports
- Hardcoded exfiltration endpoints
- Suspicious subprocess chains
Usage
Basic static scan only
python scripts/fang_audit.py \x3Ctarget_dir>
With LLM deep analysis
python scripts/fang_audit.py \x3Ctarget_dir> --llm-key sk-... --model gpt-4o-mini
OpenAI-compatible API (e.g. local Ollama / DeepSeek)
python scripts/fang_audit.py \x3Ctarget_dir> \
--llm-key any \
--model deepseek-chat \
--base-url https://api.deepseek.com/v1
Save report to file
python scripts/fang_audit.py \x3Ctarget_dir> --llm-key sk-... --output report.txt
Scan all workspace skills at once
python scripts/fang_audit.py C:/Users/dad/.openclaw/workspace/skills
Agent Workflow
When the user asks to audit skills for env theft:
- Ask for the target directory (default: workspace
skills/folder) - Run Phase 1 static scan — report summary immediately
- If HIGH or MEDIUM risks found, ask whether to run LLM deep analysis
- If
--llm-keyis available (from env or user), run Phase 2 automatically - Present the final threat report:
- List each risky file with risk level + reason
- Highlight any CRITICAL combined patterns (env read + network send)
- Recommend action: QUARANTINE (HIGH), REVIEW (MEDIUM), MONITOR (LOW)
Risk Response Guide
| Risk Level | Recommended Action |
|---|---|
| 🔴 HIGH | Immediately quarantine the skill, do not run it |
| 🟡 MEDIUM | Manual code review before use |
| 🟢 LOW | Monitor; likely benign but worth noting |
| ✅ CLEAN | Safe to use |
Notes
- The LLM analysis truncates each file to 3000 chars to stay within token limits.
- For very large skill directories, consider scanning one skill at a time.
scan_env.pyonly processes.pyand.shfiles;fang_audit.pyLLM mode also covers.js,.ts,.ps1.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install fang - 安装完成后,直接呼叫该 Skill 的名称或使用
/fang触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Fang: protect your env variables from being stealed. 是什么?
Protect environment variables from being stolen by malicious skill scripts. Runs a two-phase security audit: (1) static pattern scan via scan_env.py to detec... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 121 次。
如何安装 Fang: protect your env variables from being stealed.?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install fang」即可一键安装,无需额外配置。
Fang: protect your env variables from being stealed. 是免费的吗?
是的,Fang: protect your env variables from being stealed. 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Fang: protect your env variables from being stealed. 支持哪些平台?
Fang: protect your env variables from being stealed. 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Fang: protect your env variables from being stealed.?
由 Jay(@goog)开发并维护,当前版本 v1.0.0。