Back to skill

Security audit

SkillHub/ClawHub 技能发布

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report risks in its installer and handling of credentials and files, alongside capabilities that go beyond its stated publishing purpose.

Consider not installing until the installer can be independently verified, authenticated requests are limited to trusted destinations, and bundle collection is shown to stay within the skill directory. Review the extra deletion and GitHub capabilities against your needs; the scan was partial because some references were missing and the image was outside analyzer coverage.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/publish.py
Finding

Bundle collection follows file symlinks outside the authorized directory

Content
View full analysis

Impact

An attacker can cause disclosure of local confidential content or credentials. For example, a symlink to the publisher's .netrc can expose login/password entries while retaining an allowed .txt bundle name.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (34)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Most file access, credential use, and network operations directly support the declared publishing workflow. However, rm_skill performs POST /api/v1/community/skills//unlist followed by DELETE /api/v1/community/skills/, a destructive capability not disclosed in the declared purpose. Requiring --yes limits accidental invocation but does not remove this mismatch. Additionally, judge_failure and publish treat every HTTP 409 as a slug conflict, contrary to the declared use of 409 VERSION_EXISTS to diagnose publication progress. This supplied file contains no ClawHub publishing or /versions//signature probe implementation; those may exist elsewhere in the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Listing owned skills is consistent with publication-status verification. Unlisting and deleting skills is a distinct, destructive lifecycle operation that the description does not declare. The explicit confirmation flag provides a safeguard but does not resolve the description mismatch. The underlying Python implementation was not supplied, so this assessment is limited to the commands and behavior documented in the provided chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The supplied command performs a remote Git repository write. The declared purpose does not mention repository publication or synchronization, and the snippet provides no connection between this push and either marketplace's publication workflow. This is an undeclared publication destination and operation, rather than a demonstrated supporting step. The actual URL behind origin is not shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The supplied commands concern Git repository synchronization and upstream repair, rather than packaging skills, submitting them to the declared marketplaces, or checking marketplace review status. In particular, git push transmits repository content and updates a remote branch. Nothing in this chunk connects those operations to the declared marketplace workflow, so they represent an undeclared repository-management capability rather than an established supporting implementation detail.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The supplied command performs a Git repository push, not skill packaging, marketplace submission, or publication-status verification. No connection between the origin remote and the declared publishing workflow is provided. The error comment suggests the push failed, so successful remote modification is not established.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied commands target GitHub rather than either declared skill marketplace. The declared purpose does not mention GitHub repository management, and the chunk provides no connection showing that this owner-specific check supports marketplace publication. The commands only read repository information; they do not create repositories, publish skills, or check marketplace review status.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied command checks GitHub credentials rather than packaging skills, interacting with either declared marketplace, or verifying publication status. No connection to a necessary GitHub-backed publishing step is shown. The command does not itself modify repositories or exercise the scopes listed in the comment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Cloning and inspecting skill sources could support preflight preparation. However, git add -A && git commit && git push additionally modifies remote repository state, a capability not disclosed by the description. The supplied chunk does not itself package a skill, publish to either marketplace, or check publication status. The mismatch is the additional Git write workflow, not merely the absence of marketplace operations from this partial excerpt.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The supplied command performs icon generation rather than packaging, publishing, or checking marketplace status. Although icon preparation could support publication, this chunk establishes no such integration, and the declared description does not mention asset generation. The invoked script's internal behavior is not available for assessment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
83% confidence
Finding

The supplied commands implement repository checkout and local commit creation rather than marketplace packaging, submission, or status checks. Although Git operations could support a publishing workflow, this chunk establishes no such connection and introduces repository maintenance beyond the stated purpose. It does not push commits or otherwise demonstrate remote repository modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
82% confidence
Finding

所示代码访问的是 GitHub 仓库提交接口,而不是本地 Skill 文件或声明中的两个市场。代码未体现该查询与发布预检、状态核验或竞品对标的关联,因此按所提供片段判断,存在未声明的资源访问能力。该操作为只读查询,没有证据表明其泄露凭据或修改仓库。

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 305)May include surrounding context.

md
| 文件 | 什么时候读 |
|---|---|
| `scripts/preflight.py` | Step 1;发布前必跑 |
| `scripts/publish.py` | Step 2-6;日常发布主入口(含 status / compare / mine / rm / categories) |
| `references/icon-upload.md` | 要传图标/封面,或怀疑图标没生效(`iconAuditStatus: null`)时 |
| `references/categories.md` | **SkillHub** 要填/补分类,或后台显示「未分类」时 |
| `references/clawhub-catalog.md` | **ClawHub** 要填分类/话题,或问 ClawHub 要不要图标时(14 个可用 slug) |

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The command immediately executes a mutable network response with the current user's privileges, without reviewing it or verifying an independently trusted signature or digest. CLI installation is relevant to publishing, but compromise of the installer endpoint or its downstream package distribution could execute arbitrary code and access local publishing credentials.

Content

Scanner excerpt · references/cli-install.md (reported line 12)May include surrounding context.

bash
# 官方引导脚本(会拉 COS 上的 kit 包)
curl -fsSL https://skillhub.cn/install/install.sh | bash -s -- --cli-only

Windows 直接可用,不必 WSL —— kit 核心是纯 Python 的 skills_store_cli.py(约 226KB),

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/cli-install.md (reported line 52)May include surrounding context.

md
1. 浏览器 https://skillhub.cn/dashboard/keys → **创建 API key** → 一次性显示 `skh_xxx`(**只显示一次**)。
2. `skillhub login --key skh_xxx --host https://api.skillhub.cn` → `✓ Logged in as @handle`。
3. `skillhub auth whoami` 验证(端点 `GET /api/v1/auth/me`)。
4. Token 落盘在 `~/.skillhub/credentials.json`,结构为 `{"user": {"token": "...", "host": "..."}}`。

## CLI 的目录收集 vs 服务端白名单(**必踩的坑**)

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/github-repo.md (reported line 30)May include surrounding context.

凭据:gh auth login(2026-09-19 起已登录,此前结论已废)

旧结论作废:本文档曾写「gh CLI 没登录,token 只在 ~/.git-credentials」。 2026-09-19 已完成 gh auth login(device flow),现状态:

bash

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/github-repo.md (reported line 35)May include surrounding context.

bash
gh auth status
# ✓ Logged in to github.com account oracis (keyring), scopes: gist, read:org, repo

gh 不读 git 的 http.proxy 配置,所以任何 gh 联网命令前必须显式给代理,

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/github-repo.md (reported line 51)May include surrounding context.

md
- **每次重跑都会换新 code** —— 别把上一轮的 code 发给用户。
- code 约 15 分钟过期;完成后输出 `✓ Logged in as <user>`。

(`~/.git-credentials` 里的 `gho_` token 仍在,可作为无 gh 环境的兜底。)

## 推送

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/path-traps.md (reported line 148)May include surrounding context.

md
git ls-remote origin | head

# 2. 按实际分支名推
git push origin main

# 3. 若 upstream 丢了,重新绑定
git push -u origin main        # 重新设置 upstream 并推

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/path-traps.md (reported line 148)May include surrounding context.

md
git ls-remote origin | head

# 2. 按实际分支名推
git push origin main

# 3. 若 upstream 丢了,重新绑定
git push -u origin main        # 重新设置 upstream 并推

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/publish.py (reported line 56)May include surrounding context.

python
pass

HOME = os.path.expanduser("~")
CREDENTIALS = os.path.join(HOME, ".skillhub", "credentials.json")
DEFAULT_HOST = "https://api.skillhub.cn"
PUBLISH_PATH = "/api/v1/community/skills/publish"
ME_PATH = "/api/v1/auth/me"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/publish.py (reported line 117)May include surrounding context.

python
# 凭据
# --------------------------------------------------------------------------- #
def load_creds(host_override=None):
    """读 ~/.skillhub/credentials.json,返回 (token, host)。"""
    if not os.path.exists(CREDENTIALS):
        return None, "凭据文件不存在,先运行 SkillHub CLI 的 login"
    try:

Tainted flow: 'req' from open (line 138, file read) → urllib.request.urlopen (network output)

High
Category
Data Flow
Confidence
95% confidence
Finding

The login check sends the existing SkillHub bearer token to the host selected by --host or the credentials file without validating its origin or requiring HTTPS. If an attacker induces a login check against their host, even this apparently read-only diagnostic discloses the credential; default cross-origin redirect handling provides another disclosure route.

Content

Scanner excerpt · scripts/publish.py (reported line 142)May include surrounding context.

python
host.rstrip("/") + ME_PATH,
        headers={"Authorization": f"Bearer {token}", "Accept": "application/json"})
    try:
        with urllib.request.urlopen(req, timeout=30) as r:
            data = json.loads(r.read().decode("utf-8") or "{}")
            u = data.get("user", data) or {}
            print(json.dumps({"loggedIn": True, "userId": u.get("id"),

Tainted flow: 'req' from open (line 187, file read) → urllib.request.urlopen (network output)

High
Category
Data Flow
Confidence
94% confidence
Finding

Authenticated searches attach the locally stored bearer token to an unchecked host, including a CLI host override, and use urllib's default redirect handling, which can forward Authorization across origins. An attacker who influences the host argument or a redirect can receive the token; searching the intended SkillHub endpoint is otherwise legitimate.

Content

Scanner excerpt · scripts/publish.py (reported line 188)May include surrounding context.

python
if token:
        headers["Authorization"] = f"Bearer {token}"
    req = urllib.request.Request(url, headers=headers)
    with urllib.request.urlopen(req, timeout=30) as r:
        data = json.loads(r.read().decode("utf-8") or "{}")
    results = data.get("results") or data.get("skills") or []
    return results[:limit] if limit else results

Tainted flow: 'req' from open (line 339, file read) → urllib.request.urlopen (network output)

High
Category
Data Flow
Confidence
95% confidence
Finding

The shared API helper unconditionally attaches the bearer token to requests using an unchecked host and default redirect handling. An attacker-controlled host or cross-origin redirect can expose the credential, potentially enabling whatever publishing, unlisting, and deletion permissions that token carries.

Content

Scanner excerpt · scripts/publish.py (reported line 342)May include surrounding context.

python
req = urllib.request.Request(host.rstrip("/") + path, data=data,
                                 method=method, headers=headers)
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            raw = r.read()
            code = r.getcode()
    except urllib.error.HTTPError as e:

Tainted flow: 'req' from open (line 732, file read) → urllib.request.urlopen (network output)

High
Category
Data Flow
Confidence
95% confidence
Finding

Uploading an icon is expected functionality, but this request sends both local image bytes and the stored bearer token to an unchecked destination. An attacker who influences the selected host can obtain both, and cross-origin redirects can also disclose the Authorization header.

Content

Scanner excerpt · scripts/publish.py (reported line 741)May include surrounding context.

python
"Referer": "https://skillhub.cn/",
    })
    try:
        with urllib.request.urlopen(req, timeout=timeout) as r:
            raw = r.read()
    except urllib.error.HTTPError as e:
        try: