T03 · Remote Payload Retrieval and Execution
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Remote Source Retrieval Allows the Reviewed Implementation to Change<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 21–30 **Vulnerability Type**: Unpinned remote payload retrieval and supply-chain risk **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown This bundled package includes a pre-compiled binary. You can still build from source if you prefer: ```bash git clone https://gitee.com/random_player/cmic-skill-scanner.git cd cmic-skill-scanner && cargo build --release ``` ``` ### Technical Analysis The documented source-build procedure clones the repository's current default branch without specifying a reviewed commit hash, signed tag, or release archive checksum. Consequently, the code retrieved when a user follows these instructions may differ from the implementation that existed when this skill package was audited. This risk is compounded by the audited package contents: the documented `assets/bin/skillscan` binary and `assets/build/skillscan.sha256` checksum file are absent. Although `SKILL.md` and `assets/build/build-info.json` state a checksum, no corresponding binary is present to validate. Users therefore cannot verify or inspect the claimed bundled executable and may be more likely to follow the mutable remote build instructions. The remote repository is not proven malicious by the available evidence. The vulnerability is the lack of immutable source pinning, which creates a time-of-check/time-of-use supply-chain boundary controlled by the remote repository or its hosting account. ### Attack Path 1. A user obtains this skill package and discovers that the documented bundled binary is absent. 2. The user follows the recommended source-build command in `SKILL.md`. 3. `git clone` retrieves the repository's current default branch rather than an audited revision. 4. An attacker who has compromised the repository, maintainer account, or relevant source-hosting path modifies the branch after this package was reviewed. 5. The user runs `cargo build --release`, compiling the attacker- ...[truncated 947 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin source retrieval to a specific full commit hash: ```bash git clone https://gitee.com/random_player/cmic-skill-scanner.git cd cmic-skill-scanner git checkout --detach <full-reviewed-commit-hash> cargo build --release --locked ``` 2. Publish and document a cryptographically signed release tag, and require users to verify its signature before building. 3. Include the promised binary and checksum file in the package: - `assets/bin/skillscan` - `assets/build/skillscan.sha256` 4. Verify during packaging that the bundled binary's SHA-256 digest matches both the checksum file and `assets/build/build-info.json`. Fail the build if any artifact is absent or inconsistent. 5. Include `Cargo.lock` in the reviewed source release and require `cargo build --release --locked` so dependency resolution cannot silently change. 6. Prefer a source archive tied to the reviewed commit and publish its SHA-256 digest through an independently authenticated release channel. 7. Update the installation instructions so checksum verification is mandatory rather than optional, and instruct users not to execute the binary when an artifact or checksum is missing. ]]>
