Skill Trust Decision

northcap-donor-badge

文档声称数据发往本地 localhost:8791,实际代码硬编码发送到巴西 IP 186.240.156.169,且携带自签名证书构建 TLS 连接,构成严重的文档欺骗和未声明外部通信。

Install decision first Source: ClawHub Scanned: 20 days ago
Files 4
Artifacts 5
Violations 1
Findings 5
Most direct threat evidence
01
用户阅读 SKILL.md,误以为数据发往本地 localhost:8791 Entry · SKILL.md
02
用户执行 python3 scripts/donate.py --tx <hash> --agent <id> --note <msg>,代码实际 POST 数据到 186.240.156.169:8791 Escalation · scripts/donate.py
03
txHash + agentId + chain + note 明文或通过自签名 TLS 发送到外部 IP,note 字段可能包含用户不希望外传的上下文信息 Impact · scripts/donate.py

Why this conclusion was reached

3/4 dimensions flagged
Block
Declared vs actual capability

1 undeclared or violating capabilities were inferred.

Block
Hidden execution and egress

1 high-risk artifacts or egress signals were extracted.

Block
Attack chain and severe findings

The report includes 3 attack-chain steps and 2 severe findings.

Review
Dependencies and supply chain hygiene

Dependency information is incomplete, so supply-chain confidence stays limited.

Attack Chain

01
用户阅读 SKILL.md,误以为数据发往本地 localhost:8791

Entry · SKILL.md:23

02
用户执行 python3 scripts/donate.py --tx <hash> --agent <id> --note <msg>,代码实际 POST 数据到 186.240.156.169:8791

Escalation · scripts/donate.py:20

03
txHash + agentId + chain + note 明文或通过自签名 TLS 发送到外部 IP,note 字段可能包含用户不希望外传的上下文信息

Impact · scripts/donate.py:77

What drove the risk score up

文档欺骗 — 声称 localhost 实际发往外部 IP +30

SKILL.md metadata 声明 network: ['http://localhost:8791'],curl 示例用 http://localhost:8791,但 scripts/donate.py:20 硬编码 BASE = 'https://186.240.156.169:8791',数据实际发送到巴西外部 IP

未声明外部通信 +20

SKILL.md 未提及任何外部 IP 连接,用户以为数据发往本地验证服务,实际发往 186.240.156.169

自签名证书 + 硬编码 IP 组合 +12

northcap-ca.pem 是为 186.240.156.169 签发的自签名 CA,代码中 _ctx() 自动加载该证书构建 TLS,易受中间人攻击

自动加载路径暗示 TLS 劫持风险 +6

_ctx() 自动扫描 ~/.openclaw/workspace/projects/x402-api/tls/cert.pem 路径加载证书,该路径非标准,存在证书注入风险

Most important evidence

High Doc Mismatch

文档声称本地验证,实际发往外部 IP

SKILL.md metadata 声明 'network: ["http://localhost:8791"]',curl 示例用 'http://localhost:8791',暗示数据仅发往本地。但 donate.py:20 硬编码 BASE = 'https://186.240.156.169:8791',txHash、agentId、chain、note 等数据实际被发送到巴西 IP。用户以为在本地验证捐赠,实际数据已泄露给外部服务器。

scripts/donate.py:20
SKILL.md 必须如实声明实际外部通信目标 IP/域名,移除 localhost 误导性示例
High Supply Chain

自签名 CA 证书硬编码绑定外部 IP

northcap-ca.pem 是为 186.240.156.169 签发的自签名证书,而非公共可信 CA。代码 _ctx() 优先使用此自签名证书进行 TLS 验证,若该证书被替换或注入,攻击者可实施中间人攻击解密所有发送的捐赠数据。

scripts/northcap-ca.pem:1
应使用公共可信 CA(如 Let's Encrypt)签发的证书,或在 SKILL.md 中明确说明自签名证书的来源和信任方式
Medium Data Exfil

捐赠数据(txHash+agentId+note)发送至外部服务器

虽然 txHash 和 agentId 本身非高敏感信息,但 --note 字段用户可控(可包含敏感上下文),且数据 POST 到外部 IP。代码未对 note 内容做任何过滤或警告。

scripts/donate.py:77
在 SKILL.md 中明确警告 note 字段不要包含敏感信息,并考虑对 note 做长度/内容限制
Medium Doc Mismatch

metadata 权限声明与实际网络行为不符

metadata permissions.network 声明为 'http://localhost:8791',属于本地网络访问权限,实际发往外部 IP 186.240.156.169:8791,权限粒度声明严重失实。

SKILL.md:2
更新 metadata.network 声明为实际外部端点
Low Supply Chain

X402_CAFILE 环境变量控制可覆盖证书路径

_ctx() 优先读取 X402_CAFILE 环境变量指定的证书文件,攻击者若能控制该环境变量,可注入恶意证书。风险受限于攻击者需已具备环境变量写入权限。

scripts/donate.py:28
添加环境变量来源验证,禁止从不可信路径加载证书

Declared capability vs actual capability

Network Block
Declared READ (localhost only)
Inferred WRITE (external IP 186.240.156.169)
scripts/donate.py:20 — 硬编码 BASE = 'https://186.240.156.169:8791'
Environment Pass
Declared NONE
Inferred READ
scripts/donate.py:28 — 读取 X402_CAFILE 环境变量控制证书加载

Suspicious artifacts and egress

High IP Address
186.240.156.169

scripts/donate.py:20

Medium Wallet Address
0xafd1c6bC2B35152f30E3D0dBE99eE1d40E5a5CF8

SKILL.md:32

Medium External URL
https://186.240.156.169:8791

scripts/donate.py:20

Medium External URL
https://clawhub.ai/user/northcap-group

skill-card.md:9

Medium External URL
https://clawhub.ai/northcap-group/skills/northcap-donor-badge

skill-card.md:39

Dependencies and supply chain

There are no structured dependency warnings.

File composition

4 files · 241 lines
Markdown 2 files · 129 linesPython 1 files · 92 linesOther 1 files · 20 lines
Files of concern · 4
scripts/northcap-ca.pem Other · 20 lines
自签名 CA 证书硬编码绑定外部 IP
scripts/donate.py Python · 92 lines
文档声称本地验证,实际发往外部 IP · 捐赠数据(txHash+agentId+note)发送至外部服务器 · X402_CAFILE 环境变量控制可覆盖证书路径 · 186.240.156.169 · https://186.240.156.169:8791
SKILL.md Markdown · 72 lines
metadata 权限声明与实际网络行为不符 · 0xafd1c6bC2B35152f30E3D0dBE99eE1d40E5a5CF8
skill-card.md Markdown · 57 lines
https://clawhub.ai/user/northcap-group · https://clawhub.ai/northcap-group/skills/northcap-donor-badge

Security positives

功能逻辑清晰,无代码执行/RCE 风险
未发现凭证窃取或环境变量遍历行为
HTTP 外部连接被主动阻止(有 localhost 检查保护)
TX 验证逻辑基于真实链上事件,有防伪造设计
skill-card.md 已知风险部分已披露部分信息