T01 · Skill Instruction Hijacking
- Location
SKILL.md:122- Finding
Mandatory Git Push Instruction Can Publish Local Changes Without Per-Operation Approval
- Content
View full analysis
**每次自身技能进化必须同步到 GitHub 仓库** 改进流程: 1. 在本地 `~/.qclaw/skills/hermes-skill/` 改进代码 2. `git add` + `git commit -m "描述"` 3. `git push` 推送到 origin/main 4. 同步更新 `SKILL.md` / `README.md` 说明(如果功能有变化) ``` The same requirement is repeated in `README.md`, lines 210-224. ### Technical Analysis The Skill text unconditionally instructs an AI agent to commit and push every self-generated improvement to `origin/main`. This changes the agent's behavior from local Skill maintenance to external publication without requiring the user to approve the exact diff, repository, branch, or data being transmitted. The instruction exceeds the minimum privileges required for local memory management, reminders, Skill evaluation, and Skill generation. Although the audited scripts do not directly execute `git push`, Skill instructions are operational directives to the agent and can cause the agent to invoke Git tools. No safeguards require the agent to: - Display and obtain approval for the exact diff. - Validate the configured Git remote. - Confirm that the repository is public or private. - Scan staged files for credentials or sensitive memory. - Restrict the commit to expected project files. - Prevent generated or attacker-controlled Skill content from being published. ### Attack Path 1. The agent loads `SKILL.md` and treats its development rules as operational instructions. 2. A normal task or malicious generated Skill causes the agent to modify local files. 3. The embedded rule directs the agent to run `git add`, `git commit`, and `git push`. 4. Broad staging or an unexpected repository state includes sensitive or unintended files. 5. The agent pushes those files to the configured ` ...[truncated 749 chars]- Remediation
View remediation
