T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILLS.md:55
- Finding
- Unverified Mutable Remote Code Is Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILLS.md:55-87` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Vulnerable Code ```python # 1. Clone repository exec(command="git clone https://github.com/imtonyjaa/autopieceone.git") # 2. Check browser tabs browser(action="tabs") # 3. Open game page (MUST include widget=2&from=claw) browser(action="open", targetUrl="https://piece.one/?widget=2&from=claw") # 4. Wait for game to load time.sleep(3) # 5. Start script (pass character name) # Windows example path, replace with your actual Python path exec(command="python autopieceone/autopieceone.py CharacterName") ``` ```python # 1. Pull latest code exec(command="git -C autopieceone pull") # 2. Close old tab and open new page browser(action="tabs") # Record old tab ID, then close it browser(action="close", targetId="<OldID>") browser(action="open", targetUrl="https://piece.one/?widget=2&from=claw") # 3. Start script exec(command="python autopieceone/autopieceone.py CharacterName") ``` ### Technical Analysis The Skill directs the Agent to clone a third-party GitHub repository and execute its Python script without pinning the repository to an immutable reviewed commit. It also instructs the Agent to run `git pull` before subsequent executions, causing the effective payload to change whenever the upstream branch changes. No checksum, cryptographic signature, release attestation, or source review is required before execution. The referenced source code is not included in the audited project, so its actual behavior cannot be independently verified from this package. Because the script uses system-level GUI automation, an altered payload may also interact with applications outside the game. ### Attack Path 1. An attacker compromises the upstream repository, its maintainer account, or the branch referenced by the default clone and pull operations. 2. The attacker modifies `autopieceone.py` or another imported file ...[truncated 915 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the executable source in the Skill package so it can be reviewed together with the instructions. 2. If remote retrieval is necessary, pin the repository to a specific immutable commit hash rather than executing the default branch. 3. Verify downloaded content against a trusted SHA-256 checksum or a cryptographically signed release before execution. 4. Do not automatically execute code after `git pull`. Display the revision and changed files and require explicit approval after review. 5. Run the automation in a dedicated, least-privileged environment with restricted filesystem and network access. 6. Limit GUI automation to an isolated browser session or virtual desktop so it cannot interact with unrelated applications. ]]>
