agent-guard
Skill delegates core functionality to an uninspectable external npm package with wallet-selling authority and version-only pinning, creating significant supply chain and credential handling risks not fully transparent in documentation.
为什么得出这个结论
2/4 个维度触发发现 1 项声明之外的能力或越权行为。
提取到 4 个一般风险产物,需要结合上下文判断。
报告包含 5 步攻击链,另有 2 项高危或严重发现。
发现 1 项需要关注的依赖或供应链线索。
攻击链
初始入口 · SKILL.md:1
preparation · scripts/package.json:8
preparation · NAUTILUS-SIDECAR.md:10
代码执行 · scripts/start-watcher.mjs:7
最终危害 · node_modules/@hypelens/hypelens-agent-guard/:1
风险分是怎么被拉高的
SKILL.md describes 'setup' and 'watcher' commands but the actual execution logic is hidden in external npm package @hypelens/hypelens-agent-guard
Package only version-pinned (0.1.18), not hash-pinned; npm can serve different content for same version
Skill can execute protective SELLs against a funded wallet via AGENT_GUARD_EXIT_PK but this is buried in docs rather than declared upfront
Private keys passed via AGENT_GUARD_EXIT_PK environment variable, documented as having live authority
npx/npm execution paths present in documentation though reasonable for CLI tools
最关键的证据
External npm package with uninspectable code
Core functionality (setup, watcher, MCP) exists entirely in @hypelens/[email protected] which cannot be audited. Scripts are thin wrappers that import and execute this external package. Any malicious code in the npm package would execute with wallet-selling authority.
scripts/setup.mjs, scripts/start-mcp.mjs, scripts/start-watcher.mjs:1 Version-only pinning without hash verification
package.json only specifies '@hypelens/hypelens-agent-guard': '0.1.18' without a commit hash or file hash. npm can serve different content for the same version number.
scripts/package.json:8 Undeclared wallet-selling capability
SKILL.md focuses on 'stop loss' and 'risk management' framing but the skill can execute protective SELLs on Polymarket/Hyperliquid via AGENT_GUARD_EXIT_PK. This is documented in detail docs but not in SKILL.md frontmatter resource declarations.
SKILL.md:50 Private key via environment variable with live authority
AGENT_GUARD_EXIT_PK environment variable grants the skill ability to SELL from the user's wallet. While skill-card.md mentions this, it's not declared as a capability.
NAUTILUS-SIDECAR.md:10 Private key potentially in shell history
Documentation suggests using export AGENT_GUARD_EXIT_PK=... which may leak to shell history. skill-card.md mentions this as a known risk.
NAUTILUS-SIDECAR.md:10 声明能力 vs 实际能力
SKILL.md: writes state/heartbeat.json, config files via setup External npm package likely makes API calls; not declared in SKILL.md npm/npx commands documented; requires node, npm binaries AGENT_GUARD_EXIT_PK and AGENT_GUARD_HL_PK env vars with wallet authority; not declared in SKILL.md resource section MCP heartbeat/guard_status documented 可疑产物与外联
https://nautilustrader.io/docs/latest/integrations/polymarket/ NAUTILUS-SIDECAR.md:36
0x9548B8E9554a1968843B3C380431b10996247c88 SKILL.md:95
https://clawhub.ai/user/polyparlay skill-card.md:9
https://clawhub.ai/polyparlay/skills/agent-guard skill-card.md:39
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| @hypelens/hypelens-agent-guard | 0.1.18 | npm | 否 | Version-only pinned; code cannot be audited in skill scope; has wallet-selling authority |
文件构成
SKILL.md NAUTILUS-SIDECAR.md skill-card.md scripts/package.json