T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:102
- Finding
- Mutable Remote Repository Is Downloaded and Executed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 102-128 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High ### Complete Code Snippet ```bash mkdir -p ~/.cue && git clone https://github.com/sensedeal/cue-skills ~/.cue/cue-skills # Alternative mirror: # git clone https://gitee.com/sensedeal/cue-skills ~/.cue/cue-skills ``` The downloaded runner is subsequently executed: ```bash python3 ~/.cue/cue-skills/cue-research/scripts/research_run.py \ --query "Target company earnings analysis: core indicators, business drivers, earnings quality, and supply-chain bargaining power" \ --template-id template_7qiAwz \ --output ~/cue-reports/$(date +%Y-%m-%d-%H%M)-earnings-analysis.md ``` ### Technical Analysis The installation procedure clones the mutable default branch of an externally controlled Git repository and later executes a Python script from that repository. It does not pin a reviewed commit hash or signed release and does not verify a checksum, signature, or trusted provenance before execution. This behavior is not literally a `curl | bash` pipeline. The separately flagged pipeline at line 180 passes an API response to a fixed Python JSON parser and does not execute the response as code. Nevertheless, cloning mutable remote code and executing it creates the same central review-time mutability concern: the effective local payload can change after the Skill itself has been audited. The Gitee mirror provides an additional mutable supply-chain source. A compromise of either repository, its maintainer account, release process, or hosting platform could cause later installations to retrieve code that was not present during this audit. The financial-analysis task requires communication with the Cue API, but it does not inherently require unrestricted execution of the latest contents of an unpinned external repository. This therefore exceeds the capability that can be safely validated from the reviewed a ...[truncated 1795 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the runner to a reviewed, immutable commit: ```bash git clone https://github.com/sensedeal/cue-skills ~/.cue/cue-skills git -C ~/.cue/cue-skills checkout --detach <reviewed-commit-hash> ``` 2. Publish and verify a cryptographic checksum or signed release before execution. 3. Prefer signed Git tags and verify the signature against a documented maintainer key. 4. Vendor the minimal reviewed runner into the Skill package when licensing and maintenance requirements permit. 5. Treat mirrors as separate trust roots. Do not present a mirror as interchangeable unless its contents and signatures are independently verified. 6. Review the runner and all imported local modules before approving a new commit. 7. Execute the runner as an unprivileged user in a restricted environment with access only to: - The required Cue credential. - The intended report output directory. - The Cue API endpoints required for the task. 8. Avoid exposing unrelated environment variables, home-directory files, or broad filesystem mounts to the runner. 9. Document an update process that requires review and hash changes rather than automatically following the upstream default branch. ]]>
