扫描报告
22 /100
token-optimizer
AI agent session token optimization skill - compresses conversation tokens from 100k+ to under 8000 using three-layer indexing and AI-powered summarization
Token optimization skill for AI agent conversations with legitimate credential access for compression API calls and one dangerous documentation command that should be fixed.
可以安装
Fix the dangerous shell command in INSTALL.md line 129 (quote the tilde). The credential access is legitimate but should be clearly declared in SKILL.md.
安全发现 3 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 中危 | Dangerous rm command in documentation 文档欺骗 | INSTALL.md:129 |
| 低危 | Undeclared credential access 文档欺骗 | scripts/compress_session.py:47 |
| 低危 | Undeclared environment variable access 文档欺骗 | SKILL.md |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 文件系统 | NONE | WRITE | ✓ 一致 | compress_session.py:52 - reads ~/.openclaw/config.json; creates/manages files in… |
| 网络访问 | NONE | READ | ✓ 一致 | compress_session.py:144 - calls OpenAI API with extracted credentials |
| 环境变量 | NONE | READ | ✗ 越权 | session_guard.py:16, compress_session.py:63-69 - reads TOKEN_OPTIMIZER_* env var… |
| 命令执行 | NONE | NONE | — | No shell execution found in code |
1 严重 8 项发现
严重 危险命令 危险 Shell 命令
rm -rf ~ INSTALL.md:129 中危 外部 URL 外部 URL
https://keepachangelog.com/en/1.0.0/ CHANGELOG.md:5 中危 外部 URL 外部 URL
https://semver.org/spec/v2.0.0.html CHANGELOG.md:6 中危 外部 URL 外部 URL
https://img.shields.io/badge/License-MIT-yellow.svg README.md:5 中危 外部 URL 外部 URL
https://opensource.org/licenses/MIT README.md:5 中危 外部 URL 外部 URL
https://img.shields.io/badge/python-3.8+-blue.svg README.md:6 中危 外部 URL 外部 URL
https://www.python.org/downloads/ README.md:6 中危 外部 URL 外部 URL
https://clawhub.com/skills/token-optimizer README.md:241 目录结构
15 文件 · 54.9 KB · 1846 行 Python 8f · 1127L
Markdown 5f · 702L
JSON 1f · 16L
Text 1f · 1L
├─
▾
scripts
│ ├─
compress_session.py
Python
│ ├─
new_session.py
Python
│ ├─
session_guard.py
Python
│ └─
status.py
Python
├─
▾
tests
│ ├─
▾
fixtures
│ │ └─
README.md
Markdown
│ ├─
__init__.py
Python
│ ├─
test_compress.py
Python
│ ├─
test_config.py
Python
│ └─
test_session_guard.py
Python
├─
_meta.json
JSON
├─
CHANGELOG.md
Markdown
├─
INSTALL.md
Markdown
├─
README.md
Markdown
├─
requirements.txt
Text
└─
SKILL.md
Markdown
依赖分析 1 项
| 包名 | 版本 | 来源 | 已知漏洞 | 备注 |
|---|---|---|---|---|
openai | >=1.0.0 | pip | 否 | Version specified but not pinned to exact version |
安全亮点
✓ No shell execution found in Python scripts - only documentation contains shell commands
✓ No base64 encoding or obfuscation detected
✓ No credential exfiltration - API keys are used locally for compression only
✓ No access to sensitive paths like ~/.ssh, ~/.aws, or .env files
✓ Clean codebase with proper error handling
✓ Includes file permission checks for config files
✓ Uses exponential backoff for API rate limits