T01 · Skill Instruction Hijacking
- Location
install-prompt.sh:242- Finding
Generic installer overwrites repository-wide AI agent instructions
- Content
View full analysis
"$TARGET_DIR/.cursorrules" echo "" >> "$TARGET_DIR/.cursorrules" cat "$TARGET_DIR/AGENTS.md" >> "$TARGET_DIR/.cursorrules" ``` ```bash # VS Code mode: replace Copilot instructions cp "$TARGET_DIR/AGENTS.md" "$TARGET_DIR/.github/copilot-instructions.md" ``` Equivalent unconditional `AGENTS.md` replacement occurs in several other branches of the same installer. ### Technical Analysis The installer writes directly to instruction files that supported AI development tools automatically consume. It does not check whether `AGENTS.md`, `.cursorrules`, or `.github/copilot-instructions.md` already contains unrelated project instructions, and it does not create a backup before replacement. The installed `AGENTS.md` is not a passive reference document. It mandates an OPC entrepreneurship persona, fixed onboarding text, mandatory output structures, stage restrictions, and refusal of tasks outside its selected domain. Consequently, replacing the target repository's instruction files changes the goals and behavior of the host agent whenever that repository is opened. This creates instruction hijacking at repository scope. Existing development rules and security constraints can be destroyed and replaced with the Skill's behavioral policy. ### Attack Path 1. A user obtains the package and runs `install.sh prompt ` or invokes `install-prompt.sh ` directly. 2. The selected target is an existing repository containing project-speci ...[truncated 1300 chars]- Remediation
View remediation
