T01 · Skill Instruction Hijacking
- Location
SKILL.md:329- Finding
Mandatory Branded Output Overrides User-Facing Response Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real publishing workflow, but it asks for powerful credentials and automates external uploads and repository changes with weak scoping and unsafe command-template handling.
Install only if you trust the skill directories you will publish and are comfortable with the agent uploading those files to ClawHub and GitHub-backed registries. Use the narrowest possible token, avoid broad classic GitHub PATs when a fine-grained token works, revoke tokens after use, review the exact file list and target platforms before publishing, and avoid publishing untrusted skill packages until the shell/JSON template escaping is fixed.
SKILL.md:329Mandatory Branded Output Overrides User-Facing Response Content
references/templates.md:77Unescaped Metadata and Paths Are Interpolated into Shell and JSON Templates
SKILL.md:57Publishing Workflow Requires an Overprivileged GitHub Personal Access Token
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Token 获取教程
### GitHub Personal Access Token (PAT)
GitHub PAT 用于向 Anthropic Skills、ECC Community、skills.sh 三个平台提交 PR 或上传文件。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Token 获取教程
### GitHub Personal Access Token (PAT)
GitHub PAT 用于向 Anthropic Skills、ECC Community、skills.sh 三个平台提交 PR 或上传文件。
The skill explicitly solicits high-privilege credentials, including a GitHub PAT with broad repo and workflow scopes, and a ClawHub token. Even if operationally needed, collecting such secrets inside a broadly-triggerable skill creates a substantial risk: accidental invocation, mishandling by the agent, token leakage in logs/process lists, or misuse to create arbitrary repository changes and workflow abuse.
|-----------|----------|-------------|
| `skill_path` | Yes | Path to the skill directory (must contain SKILL.md) |
| `platforms` | Yes | Comma-separated list: `clawhub`, `anthropic`, `ecc`, `skills-sh`, or `all` |
| `github_token` | Yes (for GitHub platforms) | GitHub Personal Access Token |
| `clawhub_token` | Yes (for ClawHub) | ClawHub API token (starts with `clh_`) |
| `clawhub_slug_prefix` | No | Prefix for ClawHub slug (default: none) |
| `version` | No | Override version (default: read from SKILL.md frontmatter) |
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
Agent: Re-runs Anthropic Skills publish step with existing credentials
## Output Rules
1. Always show the Quality Gate results before publishing
2. Always show the results table after publishing
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Case 2: GitHub Token Missing Scopes
**Detection:** Fork or file upload returns 403 "Resource not accessible by personal access token"
**Message:** "Your GitHub token doesn't have the required scopes. It needs `repo` and `workflow`. Please regenerate at https://github.com/settings/tokens/new."
**Recovery:** Ask user to regenerate with correct scopes.
The README instructs users to obtain high-privilege GitHub and ClawHub tokens and states that the agent will automatically perform API calls and create PRs, but it does not prominently warn that these credentials are sensitive or that the skill will make external, potentially irreversible remote changes. In an agent context, this increases the risk of users handing over broad credentials without informed consent and of accidental publication to third-party services.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
**ClawHub Token:**
1. 打开 https://clawhub.ai 并登录
2. 进入 Settings -> API Tokens
3. 点击 "Create Token",命名为 "skill-publish"
4. 复制 Token(以 `clh_` 开头)
### 第 2 步:安装技能
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
**ClawHub Token:**
1. 打开 https://clawhub.ai 并登录
2. 进入 Settings -> API Tokens
3. 点击 "Create Token",命名为 "skill-publish"
4. 复制 Token(以 `clh_` 开头)
### 第 2 步:安装技能
The bulk publishing example encourages wide-reaching automated publication across multiple platforms without warning about the scale of remote changes, rate limits, accidental disclosure, or mass submission mistakes. In this skill's context, bulk mode amplifies the blast radius because a single command could push many skills to several external repositories and APIs.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
**ClawHub Token:**
1. Go to https://clawhub.ai -> Settings -> API Tokens
2. Click "Create Token", name it "skill-publish"
3. Copy the token (starts with `clh_`)
### Step 2: Install the Skill
The skill description emphasizes convenience but does not clearly disclose that execution will create external pull requests, upload content to third-party services, and use user-provided tokens. That omission can mislead users about the consequence of activation, increasing the chance of accidental remote changes and secret disclosure into a workflow they did not intend to start.
The English activation phrases are broad enough to match common user intents such as 'upload skill', 'submit PR', or 'deploy skill', which can cause the agent to invoke a high-impact publishing workflow unexpectedly. Because this skill performs remote actions across external platforms, overbroad triggers materially increase the risk of unintended credential collection and unintended repository or marketplace changes.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
**Recovery by tool:**
- `curl` missing:
- macOS: `brew install curl`
- Ubuntu: `sudo apt install curl`
- Alpine: `apk add curl`
- `base64` missing:
- Ubuntu: `sudo apt install coreutils`
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
**Recovery by tool:**
- `curl` missing:
- macOS: `brew install curl`
- Ubuntu: `sudo apt install curl`
- Alpine: `apk add curl`
- `base64` missing:
- Ubuntu: `sudo apt install coreutils`
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
**Recovery by tool:**
- `curl` missing:
- macOS: `brew install curl`
- Ubuntu: `sudo apt install curl`
- Alpine: `apk add curl`
- `base64` missing:
- Ubuntu: `sudo apt install coreutils`
The playbook instructs collection of GitHub and ClawHub tokens and immediate authenticated publishing actions, but does not require a clear user-facing warning that secrets will be transmitted to third-party services and that actions can create forks, branches, uploads, PRs, and live publications. This weakens informed consent and increases the chance of users providing high-privilege credentials without understanding the external side effects.
The file states tokens are never stored for the current session, but later relies on prior publish-session records from an execution log to support status checking. That inconsistency creates a risk that sensitive publish metadata, and potentially credentials or credential-adjacent data, are retained longer than users were told, undermining data-minimization and trust assumptions.
This endpoint call transmits a bearer token to an external service for verification. Although token verification is expected functionality, it is still an external transmission of sensitive credentials and becomes risky if performed without clear disclosure, scope minimization, and secure token handling in the calling skill.
curl -s \
-H "Authorization: Bearer {TOKEN}" \
-H "Accept: application/json" \
https://clawhub.ai/api/v1/whoami
The template explicitly uploads local skill files (SKILL.md and multiple references/*.md files) to an external service, but the surrounding instructions do not require a clear user-facing consent or warning before transmission. This is dangerous because skill content may contain proprietary prompts, internal procedures, secrets, or sensitive metadata that would be exfiltrated to a third party if the skill is run automatically.
This request sends a GitHub bearer token to api.github.com to identify the user. While normal for GitHub integrations, it is still a credential transmission to an external service and should be treated as sensitive, especially in automated agent workflows where users may not realize network access is occurring.
curl -s
-H "Authorization: Bearer {TOKEN}"
-H "Accept: application/vnd.github+json"
https://api.github.com/user
Expected: `{"login":"username",...}`
These GitHub templates automate forking, branch creation, file upload, and pull request creation, which sends local skill files and repository content to GitHub without an embedded requirement for informed user consent. In an agent setting, this can cause unintended publication of private or sensitive material and creates durable public artifacts such as forks and PRs.
Fork creation is an external state-changing action on GitHub, initiated with a bearer token. In context, this is more dangerous than a read-only API call because it can create persistent remote artifacts and may expose intent, metadata, or content flow to a third-party platform without adequate warning.
curl -s -X POST
-H "Authorization: Bearer {TOKEN}"
-H "Accept: application/vnd.github+json"
https://api.github.com/repos/{OWNER}/{REPO}/forks
-d '{}'
Wait 3 seconds after forking.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -s
-H "Authorization: Bearer {TOKEN}"
-H "Accept: application/vnd.github+json"
https://api.github.com/repos/{USERNAME}/{REPO}/git/ref/heads/{DEFAULT_BRANCH}
Extract: `.object.sha`
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -s
-H "Authorization: Bearer {TOKEN}"
-H "Accept: application/vnd.github+json"
https://api.github.com/repos/{USERNAME}/{REPO}/git/ref/heads/{DEFAULT_BRANCH}
Extract: `.object.sha`
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -s
-H "Authorization: Bearer {TOKEN}"
-H "Accept: application/vnd.github+json"
https://api.github.com/repos/{USERNAME}/{REPO}/git/ref/heads/{DEFAULT_BRANCH}
Extract: `.object.sha`
No suspicious patterns detected.