Install
openclaw skills install fangProtect environment variables from being stolen by malicious skill scripts. Runs a two-phase security audit: (1) static pattern scan via scan_env.py to detect env reads, network calls, encoding, and exec usage; (2) optional LLM deep analysis of all scripts in the target skill directory for sophisticated theft patterns. Outputs a structured threat report with risk ratings (HIGH/MEDIUM/LOW/CLEAN). Use when: auditing installed or downloaded skills before use, investigating suspicious scripts, running periodic security sweeps of the skill directory, or verifying that no skill is exfiltrating API keys / secrets.
openclaw skills install fangTwo-phase audit tool to detect environment variable theft in skill 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) |
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
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:
python scripts/fang_audit.py <target_dir>
python scripts/fang_audit.py <target_dir> --llm-key sk-... --model gpt-4o-mini
python scripts/fang_audit.py <target_dir> \
--llm-key any \
--model deepseek-chat \
--base-url https://api.deepseek.com/v1
python scripts/fang_audit.py <target_dir> --llm-key sk-... --output report.txt
python scripts/fang_audit.py C:/Users/dad/.openclaw/workspace/skills
When the user asks to audit skills for env theft:
skills/ folder)--llm-key is available (from env or user), run Phase 2 automatically| 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 |
scan_env.py only processes .py and .sh files; fang_audit.py LLM mode also covers .js, .ts, .ps1.