Skill Trust Decision

skill-publisher

upload_to_github.py 包含硬编码 GitHub Token 且 SKILL.md 声明与实际行为严重不符,构成文档欺骗和凭证泄露双重高危行为

Install decision first Source: ClawHub Scanned: Jun 11, 2026
Files 10
Artifacts 12
Violations 3
Findings 4
Most direct threat evidence
Critical Credential Theft
硬编码 GitHub Personal Access Token

upload_to_github.py 第7行硬编码真实 GitHub PAT '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',任何获取此文件的人可提取并滥用该凭证访问 EdwardWason 的 GitHub 账户

upload_to_github.py:7

Why this conclusion was reached

3/4 dimensions flagged
Block
Declared vs actual capability

3 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 5 attack-chain steps and 3 severe findings.

Pass
Dependencies and supply chain hygiene

Dependencies are present but no obvious high-risk issue stands out.

Attack Chain

01
用户/攻击者读取 SKILL.md,了解 skill-publisher 功能

Entry · SKILL.md:1

02
发现 upload_to_github.py Python 脚本

Entry · upload_to_github.py:1

03
提取第7行硬编码的 GitHub PAT

Escalation · upload_to_github.py:7

04
使用泄露的凭证访问 EdwardWason 的 GitHub 账户,执行未授权操作

Impact · upload_to_github.py:15

05
读取 BASE_DIR 获取用户本地项目路径 'd:\TRAE SOLO CN\project\'

Impact · upload_to_github.py:10

What drove the risk score up

硬编码 GitHub Token +35

upload_to_github.py:7 包含真实 GitHub PAT (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),可被提取滥用

文档欺骗 +25

SKILL.md 声明 requires_api_key:false 且推送方法为 git/gh CLI,但代码使用 Python REST API + 硬编码凭证

本地路径泄露 +15

BASE_DIR 硬编码为 'd:\TRAE SOLO CN\project\skill-publisher',违反 SKILL.md 安全审计标准

Most important evidence

Critical Credential Theft

硬编码 GitHub Personal Access Token

upload_to_github.py 第7行硬编码真实 GitHub PAT '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',任何获取此文件的人可提取并滥用该凭证访问 EdwardWason 的 GitHub 账户

upload_to_github.py:7
将 TOKEN 改为环境变量读取:TOKEN = os.environ.get('GITHUB_TOKEN'),并在文档中说明需要设置环境变量
Critical Doc Mismatch

SKILL.md 声明与实际行为严重不符

SKILL.md frontmatter 声明 requires_api_key:false,推送方法声明为 'git push → gh CLI → REST API',但 upload_to_github.py 使用 Python 脚本 + 硬编码凭证直接调用 GitHub REST API,与文档描述完全不符

SKILL.md:6
更新 SKILL.md metadata.requires_api_key 为 true,并在工作流程中明确说明 Python 脚本的使用方式和凭证配置要求
High Sensitive Access

本地路径硬编码泄露用户目录结构

BASE_DIR 硬编码为 'd:\TRAE SOLO CN\project\skill-publisher',暴露用户本地项目路径,违反 SKILL.md 中安全审计的本地路径扫描标准

upload_to_github.py:10
使用相对路径或从环境变量/命令行参数读取项目目录,避免硬编码绝对路径
Medium Priv Escalation

未声明的 Python 脚本执行能力

SKILL.md 描述的工作流基于 bash 命令和 AI Agent 手动操作,但实际存在 upload_to_github.py Python 脚本可自动执行所有发布操作

upload_to_github.py:1
如需保留 Python 脚本,应在 SKILL.md 中声明其存在和用途,或将其作为独立脚本从 skill 目录移除

Declared capability vs actual capability

Network Block
Declared READ
Inferred WRITE
upload_to_github.py:1 使用 urllib.request 向 GitHub API 写入数据
Filesystem Block
Declared NONE
Inferred READ
upload_to_github.py:46-49 读取本地文件上传到 GitHub
Environment Block
Declared NONE
Inferred NONE
TOKEN 硬编码而非从环境变量读取

Suspicious artifacts and egress

Critical API Key
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

upload_to_github.py:7

Medium External URL
https://img.shields.io/github/stars/EdwardWason/skill-publisher?style=flat-square

README.en.md:5

Medium External URL
https://img.shields.io/badge/license-MIT--0-green?style=flat-square

README.en.md:6

Medium External URL
https://img.shields.io/badge/ClawHub-skill--publisher-orange?style=flat-square

README.en.md:7

Medium External URL
https://clawhub.ai/skills/skill-publisher

README.en.md:7

Medium External URL
https://img.shields.io/badge/Claude%20Code-Skill-blue?style=flat-square

README.en.md:8

Medium External URL
https://img.shields.io/github/stars/

references/repo-structure.md:64

Medium External URL
https://img.shields.io/badge/ClawHub-

references/repo-structure.md:66

Medium External URL
https://clawhub.ai/skills/

references/repo-structure.md:66

Medium External URL
https://evil.com/collect?data=...

references/security-audit.md:50

Info Email
[email protected]

references/publish-procedures.md:137

Info Email
[email protected]

references/security-audit.md:105

Dependencies and supply chain

PackageVersionSourceKnown vulnNotes
urllib Python stdlib builtin No 仅使用标准库,无第三方依赖
json Python stdlib builtin No 仅使用标准库,无第三方依赖
base64 Python stdlib builtin No 仅使用标准库,无第三方依赖
os Python stdlib builtin No 仅使用标准库,无第三方依赖
time Python stdlib builtin No 仅使用标准库,无第三方依赖

File composition

10 files · 2587 lines
Markdown 9 files · 2407 linesPython 1 files · 180 lines
Files of concern · 6
SKILL.md Markdown · 343 lines
SKILL.md 声明与实际行为严重不符
references/repo-structure.md Markdown · 471 lines
https://img.shields.io/github/stars/ · https://img.shields.io/badge/ClawHub- · https://clawhub.ai/skills/
references/publish-procedures.md Markdown · 387 lines
README.en.md Markdown · 192 lines
https://img.shields.io/github/stars/EdwardWason/skill-publisher?style=flat-square · https://img.shields.io/badge/license-MIT--0-green?style=flat-square · https://img.shields.io/badge/ClawHub-skill--publisher-orange?style=flat-square · https://clawhub.ai/skills/skill-publisher · https://img.shields.io/badge/Claude%20Code-Skill-blue?style=flat-square
upload_to_github.py Python · 180 lines
硬编码 GitHub Personal Access Token · 本地路径硬编码泄露用户目录结构 · 未声明的 Python 脚本执行能力 · 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
references/security-audit.md Markdown · 151 lines
https://evil.com/collect?data=... · [email protected]
Other files · README.md · changelog-generation.md · change-detection.md · CHANGELOG.md

Security positives

SKILL.md 安全扫描流程设计完整(三层扫描)
references/security-audit.md 文档详尽,覆盖常见泄露模式
所有网络请求指向合法 GitHub API,无恶意 C2 通信
无 eval/exec 等动态代码执行
无 .env 文件包含敏感信息