T08 · Insecure Dependencies
Warning
- Location
- README.md:8
- Finding
- Unpinned External Repository Used as an Executable Dependency<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 8–13 **Vulnerability Type**: Unverified mutable executable dependency **Risk Level**: Medium ### Vulnerable Code ```bash # Clone to your skills folder git clone https://github.com/jeffaf/pokemon-skill.git ~/clawd/skills/pokemon # Make executable chmod +x ~/clawd/skills/pokemon/pokemon chmod +x ~/clawd/skills/pokemon/scripts/pokemon ``` ### Technical Analysis The installation instructions clone the mutable default branch of an external GitHub repository without pinning a reviewed commit, verifying a cryptographic checksum, or validating a signature. The downloaded `pokemon` wrapper and `scripts/pokemon` file are then granted executable permissions. Neither executable is present in the audited artifact, which contains only `README.md` and `SKILL.md`. Consequently, the artifact cannot substantiate the claim that the skill only queries PokéAPI, and the behavior of the externally obtained executables remains outside the reviewed security boundary. This creates a supply-chain trust issue: a compromise of the upstream repository, its maintainer account, or its default branch could alter the code users receive after this artifact has been reviewed. ### Attack Path 1. An attacker compromises the upstream repository or an account authorized to modify its default branch. 2. The attacker adds malicious behavior to `pokemon`, `scripts/pokemon`, or another component loaded by those files. 3. A user follows `README.md` and clones the mutable repository without selecting a known-safe commit. 4. The user marks the downloaded scripts as executable. 5. The agent invokes `pokemon` according to the usage instructions in `SKILL.md`. 6. The modified script executes with the privileges of the user account running the agent. ### Impact Assessment Successful exploitation could execute arbitrary commands with the agent user's permissions. The resulting scope may include reading or modifying files accessib ...[truncated 437 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include the complete `pokemon` wrapper and `scripts/pokemon` implementation directly in the reviewed skill package. 2. If external retrieval is unavoidable, pin the repository to a specific reviewed commit hash rather than cloning the mutable default branch. 3. Publish and verify a SHA-256 or stronger checksum for every executable before granting execution permission. 4. Prefer signed release artifacts or signed Git tags and document signature verification steps. 5. Fail installation if commit, checksum, or signature verification does not succeed. 6. Audit all downloaded scripts and any files they source or execute before deployment. 7. Run the skill with least privilege and restrict access to credentials, sensitive files, and unnecessary environment variables. 8. Ensure future security reviews cover the exact executable files distributed to users, not only their documentation. ]]>
