x402-compute
x402-compute技能功能正常但包含危险操作模式:SKILL.md文档中记录了curl|sh远程脚本执行、依赖无版本锁定、凭证本地写入文件,存在中等供应链风险和文档欺骗风险。
Why this conclusion was reached
3/4 dimensions flagged1 undeclared or violating capabilities were inferred.
2 high-risk artifacts or egress signals were extracted.
The report includes 4 attack-chain steps and 1 severe findings.
5 dependency or supply-chain issues need attention.
Attack Chain
Entry · SKILL.md:1
Escalation · scripts/provision.py:85
Escalation · scripts/wallet_signing.py:107
Impact · SKILL.md:469
What drove the risk score up
SKILL.md:469 记录 curl -sSf https://grid.x402compute.cc/install.sh | sh,供应链攻击向量
requirements.txt 使用 >= 形式,可能安装含漏洞的更新版本
get_one_time_password.py 将密码写入 .compute_password_{instance_id},模式600
wallet_signing.py:109 优先本地ows,其次npx运行时下载
Most important evidence
远程脚本管道执行
SKILL.md文档中记录了危险的curl|sh模式安装sgl CLI。虽然这是官方工具的官方安装方式,但存在供应链攻击风险。
SKILL.md:469 依赖无版本锁定
requirements.txt使用>=形式版本约束,可能安装含有安全漏洞的更新版本依赖
requirements.txt:1 凭证写入本地文件
get_one_time_password.py将实例密码写入 .compute_password_{instance_id} 文件,模式600。虽然是一次性凭证,但文件系统中的敏感数据仍是风险点
scripts/get_one_time_password.py:58 OWS CLI通过subprocess执行
wallet_signing.py通过subprocess调用ows命令,存在命令注入风险(虽然当前实现看起来安全)
scripts/wallet_signing.py:107 npx运行时下载OWS后备
wallet_signing.py在本地ows不可用时会通过npx下载@open-wallet-standard/core包,存在供应链风险
scripts/wallet_signing.py:111 文档未明确说明网络请求的写性质
SKILL.md声明WebFetch为READ,但代码中所有网络请求都是POST/GET/DELETE等写操作。虽是合法API调用,但权限映射不准确
SKILL.md:32 Declared capability vs actual capability
SKILL.md:allowed-tools包含Write;代码写入配置和凭证文件 代码发送HTTP请求(POST/GET)到API端点,但SKILL.md声明WebFetch为READ-only wallet_signing.py:107使用subprocess执行ows命令;文档记录curl|sh安装命令 代码读取PRIVATE_KEY、SOLANA_SECRET_KEY等环境变量用于签名 无跨技能调用 Suspicious artifacts and egress
curl -sSf https://grid.x402compute.cc/install.sh | sh SKILL.md:469
1.2.3.4 references/api-reference.md:233
https://docs.x402layer.cc/agentic-access/x402-compute SKILL.md:22
https://cloud.x402compute.cc SKILL.md:26
https://compute.x402layer.cc SKILL.md:71
https://grid.x402compute.cc SKILL.md:73
https://staking.x402layer.cc SKILL.md:84
https://compute.x402layer.cc/compute/provision SKILL.md:216
https://compute.x402layer.cc/compute/instances/ SKILL.md:257
https://compute.x402layer.cc/compute/credits/topup SKILL.md:304
https://compute.x402layer.cc/compute/credits/balance SKILL.md:311
https://grid.x402compute.cc/v1/models SKILL.md:436
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| eth-account | >=0.8.0 | pip | No | 无版本锁定 |
| web3 | >=6.0.0 | pip | No | 无版本锁定 |
| requests | >=2.28.0 | pip | No | 无版本锁定 |
| python-dotenv | >=1.0.0 | pip | No | 无版本锁定 |
| solders | >=0.20.0 | pip | No | 无版本锁定 |
| @open-wallet-standard/core | 0.5.0 | npm | No | OWS可选依赖,npx后备 |
File composition
scripts/get_one_time_password.py SKILL.md scripts/wallet_signing.py references/api-reference.md scripts/solana_signing.py references/node-operator.md