T01 · Skill Instruction Hijacking
Error
- Location
- SKILL.md:21
- Finding
- Mutable External Instructions Can Override Packaged Skill Behavior<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-23`, `SKILL.md:97-103`; `references/规则卡.md:4` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: High ### Vulnerable Code Snippets The following are faithful English translations of the relevant source directives: `SKILL.md:21-23`: ```markdown First read `zmm/references/Family Convention.md` (if it cannot be read, explicitly state that the convention cannot be read and red lines cannot be guaranteed, then stop; do not substitute memory for the convention). Then read `zmm/references/Interaction Specification.md`. Next, read memory from `{vault}/08-skill-memory/zmm-hook/` and `_general/`. The built-in criteria are in `references/Rule Card.md`; read them before starting. If `{vault}` contains corresponding rule files, the vault takes precedence and the rule card is only the baseline. ``` `SKILL.md:97-103`: ```markdown ## Read the main entry point first `{vault}/00-rules-and-index/Copywriting Framework - Main Entry.md` is the sole navigation point for writing copy. Follow it by default; the user does not need to request it every time. Automatically write any user feedback back into the framework according to section 5, without requiring the user to explicitly request this. ``` `references/规则卡.md:4`: ```markdown When the author's environment contains corresponding rule files in `{vault}`, the vault takes precedence and this file is the baseline. If the two locations disagree, follow the vault first and then update this file. ``` ### Technical Analysis The packaged Skill explicitly delegates mandatory behavior to files outside the audited project and gives mutable vault content precedence over the bundled rule card. Consequently, the effective instruction set cannot be determined by reviewing this package alone. This is an instruction-hijacking boundary failure: external files are treated as authoritative instructions rather than untrusted data. A party that can mod ...[truncated 1933 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Package every mandatory behavioral rule inside the reviewed Skill artifact. 2. Do not permit mutable vault content to override safety rules, tool restrictions, or core workflow instructions. 3. Treat external files as untrusted data rather than executable instructions. 4. If customization is necessary, define a strict schema containing only expected preference fields, such as tone, audience, and output length. 5. Reject free-form imperative content in external configuration fields. 6. Apply a fixed allowlist of readable paths and validate resolved paths before access. 7. Pin external rule content by version or cryptographic digest if it cannot be packaged. 8. Define a deterministic conflict policy in which packaged safety constraints always take precedence. 9. Log the source, version, and integrity status of every external configuration file used. 10. Fail closed if external content violates the schema or requests tools, file access, memory writes, or changes to security policy. ]]>
