T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:65
- Finding
- Unpinned Remote Repository Is Downloaded and Executed Locally## Vulnerability Details **File Location**: `SKILL.md`, lines 65-68 and 91-95 **Vulnerability Type**: Mutable remote payload retrieval and execution **Risk Level**: High ```bash # 1. 克隆 runner 到 ~/.cue/cue-skills mkdir -p ~/.cue && git clone https://github.com/sensedeal/cue-skills ~/.cue/cue-skills # 国内网络慢可换 Gitee 镜像: # git clone https://gitee.com/sensedeal/cue-skills ~/.cue/cue-skills ``` ```bash python3 ~/.cue/cue-skills/cue-research/scripts/research_run.py \ --query "今日盘前策略:隔夜全球事件→A股映射→产业链传导→爆发力主题" \ --template-id template_qsweF9 \ --output ~/cue-reports/$(date +%Y-%m-%d-%H%M)-pre-market.md ``` ### Technical Analysis The installation instructions clone the current default branch of an external GitHub or Gitee repository without pinning a reviewed commit, verifying a cryptographic signature, or checking file hashes. A Python program obtained from that mutable repository is subsequently executed with the user's privileges. The effective code therefore remains changeable after this Skill has been audited. The Gitee alternative creates an additional supply-chain trust point, and the instructions do not establish that both repositories contain identical, verified content. This is not the same as the pre-scan's suspected `curl | bash` behavior: the health-check response at line 154 is parsed as JSON by a fixed local Python expression rather than executed as source code. The confirmed remote-execution concern instead arises from cloning and running the unpinned repository. ### Attack Path 1. An attacker compromises the upstream maintainer account, repository, distribution mirror, or another part of the repository publication process. 2. The attacker modifies `cue-research/scripts/research_run.py` or a module imported by it on the repository's default branch. 3. A user follows the documented installation instructions and clones the modified repository. 4. The user or agent invokes `research_run ...[truncated 742 chars]
- Remediation
- ## Remediation Suggestions - Pin the repository to a specific reviewed commit hash or immutable, signed release. - Publish and verify a cryptographic checksum for every downloaded executable file. - Require signed commits or release artifacts and document signature verification before execution. - Do not treat GitHub and Gitee as interchangeable sources unless both artifacts are independently verified against the same trusted digest. - Vendor the minimal reviewed runner into the Skill package where feasible. - Run the remote client with restricted filesystem and network access, such as in a dedicated container or sandbox. - Ensure the runner can access only the required API endpoint, API credential, query input, and selected output directory. - Re-audit the pinned runner and its imports whenever the pinned version changes.
