T03 · Remote Payload Retrieval and Execution
Error
- Location
- references/install-and-attach.md:14
- Finding
- Unverified Remote Payload Retrieval and Execution## Vulnerability Details **File Location**: `references/install-and-attach.md:14-18, 27-32`; duplicated in `references/usage-and-proof.md:13-17, 21-27` **Vulnerability Type**: Remote retrieval and execution of externally controlled code **Risk Level**: High **Vulnerable Code**: ```bash git clone --depth 1 --branch v0.1.12 \ https://github.com/xiaojiou176-open/apple-notes-snapshot.git cd apple-notes-snapshot ``` The retrieved program is subsequently executed: ```bash ./notesctl run --no-status ./notesctl install --minutes 30 --load ./notesctl verify ./notesctl doctor ``` The documentation also permits retrieving the current default branch: > If you want current-main behavior instead of the last tagged proof baseline, > clone without `--branch v0.1.12`. ### Technical Analysis The Skill instructs the agent to clone a separate GitHub repository and directly execute its `notesctl` program. The downloaded implementation is not included in the audited package, so its behavior cannot be reviewed from this artifact. The repository is selected using a Git tag rather than an immutable commit hash, verified release signature, or published checksum. Git tags can be moved or replaced unless external verification is enforced. The alternative recommendation to clone the current default branch is even less stable because its effective payload can change after this Skill has been reviewed. This behavior best matches remote payload retrieval and execution: the reviewed Skill provides the retrieval and execution channel, while the effective code payload remains externally controlled. ### Attack Path 1. An attacker compromises the referenced GitHub account or repository, moves the `v0.1.12` tag, or introduces malicious code into the default branch. 2. An agent follows the Skill instructions and clones the externally controlled repository. 3. The agent executes `./notesctl run --no-status`. 4. The agent executes `. ...[truncated 746 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a full, immutable Git commit hash instead of a mutable tag or default branch. 2. Publish and verify a cryptographic release signature or SHA-256 checksum before executing `notesctl`. 3. Remove the recommendation to retrieve current default-branch behavior for routine installation. 4. Include the reviewed `notesctl` implementation in the distributed artifact, or provide a separately versioned and verifiable package. 5. Present retrieved source for review and require explicit user approval before the first execution. 6. Separate download, verification, execution, and persistence installation into distinct steps. 7. Document the files, subprocesses, network behavior, local data access, and permissions required by `notesctl`.
