Back to skill

Security audit

opensource-skill-to-github

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report risky publishing behavior, including possible exposure of local files and publishing to an undeclared service; analysis was partial.

Consider the suspicious verdict and partial analysis before installing. The main reported risks are unintended disclosure during publishing and publishing to a service not clearly included in the stated purpose. The verdict does not establish malicious intent, but it recommends careful review rather than treating the skill as safe.

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

Error
Location
scripts/skillhub_cn_publish.sh
Finding

Source-controlled filenames can inject additional local files into multipart uploads

Content
View full analysis

Impact

Disclosure of readable local files, potentially including private keys or application credentials, to the publishing endpoint and potentially the published package. The request itself causes disclosure regardless of whether the platform ultimately accepts the package.

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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (49)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The script implements an additional publishing integration, not merely an implementation detail of GitHub or clawhub publishing: it sends local files and metadata to https://api.skillhub.cn/api/v1/community/skills/publish. That destination is undeclared. It also proceeds directly to publication and slug claiming once its inputs are available, despite the stated requirement to ask at decision points. The supplied chunk does not establish whether an upstream workflow obtains confirmation or guarantees that the supplied directory is a copy. No token persistence to git, remotes, or memory is evident.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The monorepo instructions synchronize the original skill directly into the publishing repository rather than using the sanitized fork. They then stage and push the subtree without a sanitization gate or explicit approval pause, creating a path for internal documents or credentials to become public.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk does not substantiate the declared purpose: it performs no copying, sanitization, Git setup, GitHub push, or optional clawhub publishing. The reference to another skill is only a comment, not executable delegation. This assessment is limited to the supplied chunk; it does not establish what glic-check does or whether additional implementation exists elsewhere.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 79)May include surrounding context.

放进 ~/.config/opensource-skill-to-github/profile.env

OSG_GITHUB_TOKEN_CMD="gh auth token"

或使用 macOS Keychain,不把 PAT 明文写入 profile

OSG_GITHUB_TOKEN_CMD="security find-generic-password -a $USER -s opensource-skill-to-github.github-token -w"

text

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 5. LICENSE 拍板 + 生成 | 💬 → 🔧 | 对话选类型 → `scripts/gen_license.sh`(author 自动从 profile 读) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
scripts/gen_license.sh <fork-path> <MIT|Apache-2.0|GPL-3.0> "<real name>" <year>

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

生成:

README.md ← 模板含 Quick Start / Features / Install / License / Author;Changelog 段只留指针

CHANGELOG.md ← 独立版本历史(Keep a Changelog 惯例),初始含 v1.0.0 条目

.gitignore ← 通用安全规则(id_rsa / *.p12 / .keystore / certs/.key / .env / node_modules / pycache 等)

text

**Changelog 惯例(强约束)**:版本历史一律放独立 `CHANGELOG.md`——

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/scaffold.sh (reported line 124)May include surrounding context.

sh
*.keystore
**/certs/*.key
**/secrets/
.env
.env.*
!.env.example
*.token

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 · SKILL.md (reported line 305)May include surrounding context.

md
### 9.1 用户操作(必须用户做,AI 不能自动)

1. 浏览器登录 GitHub → 新建 repo `<repo-name>`(**勾 main 分支**,不勾 README/LICENSE/gitignore)
2. token 可用已配置来源(推荐 `OSG_GITHUB_TOKEN_CMD` / `gh auth token`);若没有配置,再生成 Personal Access Token(PAT)并只通过环境变量传一次

### 9.2 Token 配置与卫生(铁律)

The mono-repo publishing path copies the original skill directly into the public repository, bypassing the sanitized-fork workflow.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The monorepo example sets SRC to the original maintenance directory and copies its contents directly into the release subtree. This bypasses the fork's stripping and generated ignore rules, potentially publishing internal files, signing material, or sensitive configuration.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

bash
API=https://api.github.com/repos/<owner>/<repo>/contents/skills/<slug>
# ① 远端版本号(取 SKILL.md 正文 base64 解码后再正则)
curl -s "$API/SKILL.md?ref=main" | python3 -c "
import sys,json,base64,re
c=base64.b64decode(json.load(sys.stdin)['content']).decode()
print('远端 Version:', re.search(r'\*\*Version\*\*:\s*([\d.]+)', c).group(1))"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

c=base64.b64decode(json.load(sys.stdin)['content']).decode() print('远端 Version:', re.search(r'**Version**:\s*([\d.]+)', c).group(1))"

② 新增文件是否真进包(光看本地 commit 不算数)

curl -s "$API/scripts?ref=main" | python3 -c " import sys,json; [print(' ', x['name'], x['size'], 'bytes') for x in json.load(sys.stdin)]"

text

The decision framework permits modifying the original skill despite the manifest's unconditional fork-only rule.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The decision table explicitly permits evolving the original skill, contradicting the stated requirement never to modify it in place. An agent following this branch could remove internal configuration or change behavior in a skill that remains operationally important.

Content

No source excerpt is available for this finding.

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/opensource_playbook.md (reported line 205)May include surrounding context.

md
| Channel | Auth |
| --- | --- |
| **clawhub** | `CLAWHUB_TOKEN`, obtained via `clawhub login` web flow (fully independent system) |
| **GitHub** | Personal Access Token (PAT), **completely independent** from clawhub |
| **skills.sh** | No independent token — indexed via GitHub repo, sync uses the GitHub PAT |

⚠️ GitHub push over a restricted network uses an `Authorization: Basic base64(x-access-token:TOKEN)`

The release sequence makes optional clawhub publication a prerequisite to GitHub publication.

High
Category
Excessive Agency
Confidence
98% confidence
Finding

The prescribed sequence publishes to clawhub first, although the skill describes that destination as optional. Following it for a GitHub-only request could distribute the user's content to an additional public service without authorization.

Content

No source excerpt is available for this finding.

The monorepo release recipe publishes from the original installed skill rather than the sanitized open-source fork.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The monorepo recipe copies from the installed internal skill rather than the sanitized open-source fork. This bypasses the stripping process and can publish internal hosts, identifiers, credentials, or other private artifacts; rsync --delete can also replace an already sanitized release with those files.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/fork.sh (reported line 74)May include surrounding context.

sh
if [[ -e "$DST_DIR" ]]; then
  echo "⚠️  Destination already exists: $DST_DIR" >&2
  echo "   请由用户决定:覆盖(先 rm -rf)/ 换 new-slug / 直接进入既有副本继续工作。" >&2
  exit 3
fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/fork.sh (reported line 74)May include surrounding context.

sh
if [[ -e "$DST_DIR" ]]; then
  echo "⚠️  Destination already exists: $DST_DIR" >&2
  echo "   请由用户决定:覆盖(先 rm -rf)/ 换 new-slug / 直接进入既有副本继续工作。" >&2
  exit 3
fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/fork.sh (reported line 93)May include surrounding context.

sh
else
  cp -r "$SRC_DIR" "$DST_DIR"
  # cp 无 --exclude,复制后逐项清理(与上方 rsync 排除项对齐,含嵌套 opensourceskills 副本)
  rm -rf "$DST_DIR/node_modules" "$DST_DIR/.git" "$DST_DIR/__pycache__" \
         "$DST_DIR/.skill-data" "$DST_DIR/output" "$DST_DIR/opensourceskills" 2>/dev/null || true
  find "$DST_DIR" -name '*.pyc' -delete 2>/dev/null || true
  find "$DST_DIR" -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true

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/github_push.sh (reported line 28)May include surrounding context.

sh
GitHub token 来源优先级:
  1. GITHUB_TOKEN
  2. OSG_GITHUB_TOKEN
  3. OSG_GITHUB_TOKEN_CMD(推荐配置项,如 "gh auth token" 或 macOS Keychain 读取命令)
  4. gh auth token(已登录 GitHub CLI 时自动读取)

⚠️  不会把 token 写入 git remote 或命令输出。若使用一次性 PAT,推送完成后请撤销。

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/github_push.sh (reported line 60)May include surrounding context.

sh
② 长期环境变量:export OSG_GITHUB_TOKEN=ghp_xxx
  ③ 推荐配置项:在 $(osg_profile_path) 写入
       OSG_GITHUB_TOKEN_CMD="gh auth token"
     或 macOS Keychain 读取命令,例如:
       OSG_GITHUB_TOKEN_CMD="security find-generic-password -a \$USER -s opensource-skill-to-github.github-token -w"

如果用一次性 PAT,推送完成后请去 GitHub Settings → Tokens 撤销。

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/setup_profile.sh (reported line 182)May include surrounding context.

sh
#
# GitHub push token 可选配置:
# - 推荐:OSG_GITHUB_TOKEN_CMD="gh auth token"
# - 或 macOS Keychain:
#   OSG_GITHUB_TOKEN_CMD="security find-generic-password -a \$USER -s opensource-skill-to-github.github-token -w"
# - 不推荐但支持:OSG_GITHUB_TOKEN="ghp_xxx"(明文写入本文件,务必 chmod 600)

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 · scripts/github_push.sh (reported line 259)May include surrounding context.

sh
echo "🧹 清理 credential 残留..."
git config --unset http.extraHeader 2>/dev/null || true
# 提示用户检查 credential helper 缓存
if [[ -f "$HOME/.git-credentials" ]]; then
  if grep -q "github.com" "$HOME/.git-credentials" 2>/dev/null; then
    echo "⚠️  ~/.git-credentials 含 github.com 条目,请检查是否包含此次 PAT:"
    echo "     grep github.com ~/.git-credentials"

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 · scripts/github_push.sh (reported line 260)May include surrounding context.

sh
git config --unset http.extraHeader 2>/dev/null || true
# 提示用户检查 credential helper 缓存
if [[ -f "$HOME/.git-credentials" ]]; then
  if grep -q "github.com" "$HOME/.git-credentials" 2>/dev/null; then
    echo "⚠️  ~/.git-credentials 含 github.com 条目,请检查是否包含此次 PAT:"
    echo "     grep github.com ~/.git-credentials"
    echo "     如有残留,手工删除该行后再 revoke PAT"

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 · scripts/github_push.sh (reported line 261)May include surrounding context.

sh
# 提示用户检查 credential helper 缓存
if [[ -f "$HOME/.git-credentials" ]]; then
  if grep -q "github.com" "$HOME/.git-credentials" 2>/dev/null; then
    echo "⚠️  ~/.git-credentials 含 github.com 条目,请检查是否包含此次 PAT:"
    echo "     grep github.com ~/.git-credentials"
    echo "     如有残留,手工删除该行后再 revoke PAT"
  fi