低风险 — 风险评分 20/100
上次扫描:4 小时前 重新扫描
20 /100
Kalshalyst
Contrarian prediction market scanner using Claude Sonnet analysis, Brier score calibration, and Kelly Criterion position sizing
预测市场扫描工具,代码质量高、安全实践良好,但存在一处文档-行为差异(未声明的subprocess执行)
技能名称Kalshalyst
分析耗时51.6s
引擎pi
ClawHub Kalshalyst v1.1.5 by kingmadellc
📥 337 📦 2
ClawHub 判定 可疑 dynamic_code_executionllm_suspiciousvt_suspicious
可以安装
建议将 claude_estimator.py 中的 subprocess 调用写入 SKILL.md 文档,消除文档-行为差异

安全发现 2 项

严重性 安全发现 位置
中危
未声明的subprocess执行 文档欺骗
scripts/claude_estimator.py 使用 subprocess.run(['claude', '-p', ...]) 调用本地 Claude CLI,但 SKILL.md 只提及 Anthropic API 调用,未声明此执行路径
subprocess.run(["claude", "-p", full_prompt, "--output-format", "text"], capture_output=True, text=True, timeout=timeout, start_new_session=True)
→ 在 SKILL.md 的 Requirements 部分明确说明:'优先使用本地 Claude CLI (Max订阅),失败时回退到 Anthropic API'
scripts/claude_estimator.py:40
低危
环境变量/配置文件读取 敏感访问
_load_anthropic_key() 函数从 ~/.openclaw/.env 读取 API 密钥,这是标准的凭证管理方式,但 SKILL.md 未明确说明
key = os.environ.get("ANTHROPIC_API_KEY") or Path.home() / ".openclaw" / ".env"
→ 在 SKILL.md 的 API Keys 部分补充说明:支持从环境变量或 ~/.openclaw/.env 文件读取密钥
scripts/claude_estimator.py:57
资源类型声明权限推断权限状态证据
文件系统 WRITE WRITE ✓ 一致 scripts/trade_ledger.py:45, scripts/kalshalyst.py:107
网络访问 READ READ ✓ 一致 scripts/kalshalyst.py:409, scripts/auto_trader.py:409
命令执行 NONE WRITE ✗ 越权 scripts/claude_estimator.py:40-54
11 项发现
🔗
中危 外部 URL 外部 URL
https://kalshi.com
SKILL.md:37
🔗
中危 外部 URL 外部 URL
https://console.anthropic.com
SKILL.md:43
🔗
中危 外部 URL 外部 URL
https://polygon.io
SKILL.md:49
🔗
中危 外部 URL 外部 URL
https://ollama.ai
SKILL.md:62
🔗
中危 外部 URL 外部 URL
https://status.kalshi.com
SKILL.md:621
🔗
中危 外部 URL 外部 URL
https://x.com/KingMadeLLC
SKILL.md:732
🔗
中危 外部 URL 外部 URL
https://api.elections.kalshi.com/trade-api/v2/portfolio/orders/
scripts/auto_trader.py:409
🔗
中危 外部 URL 外部 URL
https://api.elections.kalshi.com/trade-api/v2/portfolio/positions?limit=1
scripts/kalshalyst.py:152
🔗
中危 外部 URL 外部 URL
https://api.elections.kalshi.com/trade-api/v2/markets
scripts/kalshalyst.py:456
🔗
中危 外部 URL 外部 URL
https://api.elections.kalshi.com/trade-api/v2
scripts/kalshalyst.py:854
🔗
中危 外部 URL 外部 URL
https://api.elections.kalshi.com/trade-api/v2/markets/
scripts/pnl_tracker.py:525

目录结构

17 文件 · 267.5 KB · 7728 行
Python 10f · 5392L Markdown 6f · 2332L Text 1f · 4L
├─ 📁 references
│ ├─ 📝 blocklist.md Markdown 368L · 11.4 KB
│ ├─ 📝 brier-schema.md Markdown 524L · 14.1 KB
│ ├─ 📝 contrarian-prompt.md Markdown 274L · 9.6 KB
│ └─ 📝 kelly-math.md Markdown 386L · 10.3 KB
├─ 📁 scripts
│ ├─ 🐍 auto_trader.py Python 883L · 38.4 KB
│ ├─ 🐍 brier_tracker.py Python 346L · 11.2 KB
│ ├─ 🐍 circuit_breaker.py Python 242L · 8.9 KB
│ ├─ 🐍 claude_estimator.py Python 443L · 16.5 KB
│ ├─ 🐍 kalshalyst.py Python 876L · 31.5 KB
│ ├─ 🐍 kelly_size.py Python 275L · 9.1 KB
│ ├─ 🐍 pnl_tracker.py Python 1111L · 39.9 KB
│ ├─ 🐍 qwen_analyzer.py Python 201L · 6.0 KB
│ ├─ 🐍 sports_estimator.py Python 670L · 23.0 KB
│ └─ 🐍 trade_ledger.py Python 345L · 10.8 KB
├─ 📝 README.md Markdown 46L · 2.6 KB
├─ 📄 requirements.txt Text 4L · 70 B
└─ 📝 SKILL.md Markdown 734L · 24.1 KB

依赖分析 4 项

包名版本来源已知漏洞备注
kalshi-python 1.0.0 pip 版本锁定
requests 2.32.5 pip 版本锁定
anthropic 0.18.0 pip 版本锁定
pyyaml 6.0.3 pip 版本锁定

安全亮点

✓ 代码结构清晰,模块化设计良好
✓ 凭证处理规范:读取后立即从内存清除 PEM 私钥
✓ API 错误处理完善,fail-loud 模式避免静默失败
✓ 六层安全控制:余额检查、损失限制、仓位限制、暴露限制、对账验证、冗余过滤
✓ 无恶意代码特征:无 base64 执行、无反向 shell、无可疑网络请求、无凭证外传
✓ 依赖版本锁定:requirements.txt 明确指定版本
✓ 数据仅本地存储,未发现 C2 通信或数据外泄
✓ 体育市场硬过滤,排除噪音市场