T03 · Remote Payload Retrieval and Execution
Warning
- Location
- README.md:43
- Finding
- Unpinned Remote Source Is Retrieved and Installed as an Executable## Vulnerability Details **File Location**: `README.md:43-49` **Vulnerability Type**: Unpinned remote payload retrieval and execution **Risk Level**: Medium ### Vulnerable Code ```bash # Clone the skill git clone https://github.com/gtrusler/clawdbot-filesystem.git cd clawdbot-filesystem # Make executable chmod +x filesystem # Optional: Install globally npm install -g . ``` ### Technical Analysis The manual installation instructions clone a mutable Git repository without specifying a reviewed commit, version tag, checksum, or cryptographic signature. They then instruct the user to grant executable permission to the downloaded `filesystem` file and optionally expose it globally through npm. This is particularly significant because the audited artifact does not contain the `filesystem` executable, even though `package.json` declares that file as both the package entry point and command-line executable. Consequently, the effective implementation cannot be reviewed from this artifact, and users following the instructions may execute code that differs from the audited package. A repository owner, compromised maintainer account, or attacker with repository write access could modify the repository after this audit. Subsequent installations would retrieve the modified implementation without an integrity check. ### Attack Path 1. An attacker compromises the referenced repository, a maintainer account, or the repository's default branch. 2. The attacker replaces or modifies the remote `filesystem` executable with malicious code. 3. A user follows the documented manual installation procedure. 4. `git clone` retrieves the current attacker-controlled branch contents rather than a pinned, reviewed revision. 5. The user grants executable permission with `chmod +x filesystem`. 6. The user runs `npm install -g .`, making the downloaded command globally accessible, or invokes the executable directly. 7. The malicious impl ...[truncated 728 chars]
- Remediation
- ## Remediation Suggestions 1. Include the declared `filesystem` executable in the distributed artifact so its implementation can be reviewed alongside the documentation and metadata. 2. Pin manual installation instructions to a specific audited commit or immutable signed release rather than cloning the repository's mutable default branch. 3. Publish a SHA-256 or stronger checksum for every release artifact and instruct users to verify it before granting executable permission or installing the package. 4. Cryptographically sign release tags and distribution artifacts, and document signature verification steps. 5. Ensure the package version, documentation version, metadata version, and referenced source revision are consistent. 6. Avoid recommending global installation from an unverified working tree. Prefer installation from a versioned, integrity-protected package registry or a verified local release archive. 7. Add automated release checks that fail if files declared by `package.json`, especially executable entry points, are absent from the published artifact.
