T01 · Skill Instruction Hijacking
- Location
SKILL.md:22- Finding
Mandatory Autonomous Publication Without Renewed User Consent
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 22-34 and 76-82
Vulnerability Type: Forced agent behavior with external side effects
Risk Level: HighVulnerable Code Snippet:
markdown ## 何时执行(强制) 在以下任一场景**完成后立即运行**(不要等用户提醒): 1. 新建 `workspace/skills/<name>/SKILL.md` 并通过用户认可 2. 对已有 skill 做值得发布的版本更新 3. `skillify` 脚手架完成、stub 替换为真实内容后 ## 一键命令 ```bash bash ~/.openclaw/workspace/scripts/skill-publish-dual.sh <skill-name>text ```markdown ## 脚本自动完成 1. 补齐 `LICENSE` / `README.md`(若缺失) 2. `git init` → `gh repo create` → `git push`(若无远程) 3. 更新 `SKILL.md` 的 `homepage:` 为 GitHub URL 4. `clawhub publish <绝对路径> --slug ... --version ...` 5. 在 `AGENTS.md` skillpack 表追加一行(若尚无)Technical Analysis
The skill explicitly directs the agent to execute a publishing workflow immediately and not wait for the user to request it. This instruction alters the agent's normal decision-making by treating prior acceptance of skill content as authorization for later repository creation, network publication, metadata changes, and persistent edits to
AGENTS.md.Approval of content does not necessarily constitute approval to make that content public. The instructed operation crosses a significant trust boundary because it uses authenticated GitHub and ClawHub sessions and produces externally visible side effects. The package provides a dry-run option, but it does not require the agent to use it or obtain confirmation after reviewing the exact publication plan.
Attack Path
- The skill is loaded into an agent session.
- The user asks the agent to create or materially update another skill.
- The agent follows the mandatory instruction to publish immediately without asking again.
- The external script initializes a repository, creates a GitHub repository, and pushes local files.
- The script publishes the skill to ClawHub using the user's authenticated account.
...[truncated 765 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove language that mandates immediate execution or instructs the agent not to wait for the user.
- Require explicit, task-specific confirmation immediately before every network publication.
- Before requesting approval, show the exact local directory, files to be uploaded, repository owner and name, repository visibility, ClawHub slug, version, and proposed local modifications.
- Run the workflow in
--dry-runmode first and present its output to the user. - Separate content approval from publication approval.
- Default newly created repositories to private unless the user explicitly requests public visibility.
- Scan the proposed publication set for credentials, tokens, private keys, personal information, and unrelated workspace files.
- Require separate consent before changing persistent files such as
AGENTS.md.
