x402-compute
x402-compute 是合法的去中心化计算和 GPU 云服务技能,代码质量高,安全措施完善(无.env自动加载、路径安全验证、版本锁定),存在可接受的已知风险(文档中的curl|sh安装命令和凭证环境变量读取)但均已明确声明和防护。
为什么得出这个结论
2/4 个维度触发发现 1 项声明之外的能力或越权行为。
提取到 2 个高危 IOC 或外联信号。
没有形成明确的恶意路径。
依赖结构存在,但暂未看到明显高危告警。
风险分是怎么被拉高的
SKILL.md:531 记录 node-operator 节点安装命令 `curl -sSf https://grid.x402compute.cc/install.sh | sh`,但这是官方产品文档的必要部分,非隐蔽执行
脚本读取 PRIVATE_KEY、SOLANA_SECRET_KEY 等敏感变量,但仅用于本地签名,从不外传
requirements.txt 有版本下限要求 (>=),OWS 明确禁止运行时 npx 下载
references/api-reference.md:233 存在 1.2.3.4 占位符,可能是文档示例
最关键的证据
文档中的远程安装脚本执行
SKILL.md 记录了 `curl -sSf https://grid.x402compute.cc/install.sh | sh` 用于安装 sgl CLI 节点工具。这是产品文档的必要部分,用于运行网格节点赚取收益。
SKILL.md:531 敏感环境变量读取
wallet_signing.py 和 solana_signing.py 读取 PRIVATE_KEY、SOLANA_SECRET_KEY 等环境变量用于本地签名。代码明确注释:'NO .env AUTO-LOADING — credentials come only from the process environment'。
scripts/wallet_signing.py:70 硬编码IP占位符
api-reference.md 包含 1.2.3.4 硬编码 IP,可能是占位符示例。
references/api-reference.md:233 OWS_BIN路径安全检查(正面)
wallet_signing.py:_resolve_ows_bin() 实现了全面的安全检查:要求绝对路径、验证文件存在、验证可执行权限、检查世界可写权限。代码注释明确解释了安全边界。
scripts/wallet_signing.py:95 声明能力 vs 实际能力
SKILL.md:allowed-tools 声明 Read/Write,但实际代码仅用于读取 SSH 公钥文件 所有请求均发往官方 API 端点 compute.x402layer.cc 和 grid.x402compute.cc Bash 工具用于执行 pip install 和 sgl CLI,但需用户授权 wallet_signing.py:70 读取 PRIVATE_KEY 等,但代码明确注释禁止 .env 自动加载,这是防护措施而非窃取 可疑产物与外联
curl -sSf https://grid.x402compute.cc/install.sh | sh SKILL.md:531
1.2.3.4 references/api-reference.md:233
https://docs.x402layer.cc/agentic-access/x402-compute SKILL.md:36
https://cloud.x402compute.cc SKILL.md:40
https://compute.x402layer.cc SKILL.md:85
https://grid.x402compute.cc SKILL.md:87
https://staking.x402layer.cc SKILL.md:100
https://compute.x402layer.cc/compute/provision SKILL.md:272
https://compute.x402layer.cc/compute/instances/ SKILL.md:316
https://compute.x402layer.cc/compute/credits/topup SKILL.md:363
https://compute.x402layer.cc/compute/credits/balance SKILL.md:370
0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 SKILL.md:411
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| eth-account | >=0.8.0 | pip | 否 | 版本下限锁定 |
| web3 | >=6.0.0 | pip | 否 | 版本下限锁定 |
| requests | >=2.28.0 | pip | 否 | 版本下限锁定 |
| solders | >=0.20.0 | pip | 否 | Solana SDK,版本下限锁定 |
文件构成
scripts/get_one_time_password.py SKILL.md references/processors.md scripts/wallet_signing.py references/api-reference.md scripts/solana_signing.py references/node-operator.md