T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:42
- Finding
- Execution of Unpinned Code from an External Repository<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:42-48`; execution occurs at `main.sh:12-13` and `main.sh:53-58` **Vulnerability Type**: Mutable remote payload retrieval and local execution **Risk Level**: High ### Vulnerable Code ```bash # 1. Clone RUNE repo git clone https://github.com/mrsarac/master-prompts ~/Documents/GitHub/rune # 2. Add API key to ~/.secrets echo "export RUNE_API_KEY=your_key" >> ~/.secrets # 3. Test echo "Hello" | bash main.sh ``` The downloaded implementation is subsequently selected and executed by `main.sh`: ```bash RUNE_DIR="${RUNE_DIR:-/Users/mustafa/Documents/GitHub/rune}" WAND="$RUNE_DIR/wand.py" ``` ```bash cd "$RUNE_DIR" # Strip ANSI colors from output for clean piping python3 "$WAND" inscribe "$PROMPT" \ | sed $'s/\033\[[0-9;]*m//g' ``` ### Technical Analysis The Skill does not include or implement its declared prompt-amplification engine. Instead, its setup instructions clone a mutable external Git repository and `main.sh` executes `wand.py` from that repository. The clone operation does not pin an immutable commit, verify a cryptographic checksum, validate a signature, or otherwise authenticate the exact content that will be executed. Consequently, the effective executable payload can change after this Skill has been audited. There is also a provenance inconsistency: - `SKILL.md:43` directs users to clone `github.com/mrsarac/master-prompts`. - `SKILL.md:8,55` and `README.md:75` identify repositories under `github.com/neurabytelabs`. This inconsistency makes it harder for users to determine which repository is authoritative and increases the risk of source substitution. `README.md:75` itself is only a GitHub hyperlink and does not directly execute or download anything; the actionable remote retrieval is the clone command in `SKILL.md`. ### Attack Path 1. A user installs the reviewed Skill and follows its documented setup procedure. 2. The user clones the current state of `mrsarac/master-prompts` ...[truncated 1145 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Bundle the required prompt-amplification implementation in the Skill package so that the audited code is the code executed. 2. If external retrieval is unavoidable, pin the repository to a full immutable commit SHA rather than a branch or default HEAD. 3. Publish and verify a cryptographic checksum or signed release before execution. 4. Use a single, clearly documented authoritative repository and correct the inconsistency between `mrsarac/master-prompts` and `neurabytelabs/rune`. 5. Refuse to execute `wand.py` if its expected commit, checksum, or signature cannot be verified. 6. Review and constrain the external component's network and filesystem access before execution. 7. Consider running the external component in a sandbox with a minimal environment, read-only filesystem access, and restricted network access. ]]>
