T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:20
- Finding
- Unpinned Remote Payload Retrieval and Dependency Execution<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md`, lines 20-29 - `SKILL-ZH.md`, lines 20-29 - `SKILL-EN.md`, lines 23-34 **Vulnerability Type**: Remote code retrieval and unsafe supply-chain execution **Risk Level**: High ### Vulnerable Code From `SKILL.md` and `SKILL-ZH.md`: ```bash # Clone repository git clone https://github.com/ZhenRobotics/openclaw-quant.git ~/openclaw-quant cd ~/openclaw-quant # Install dependencies pip install -r requirements.txt # Set API keys (optional for backtesting) export BINANCE_API_KEY="your-key" export BINANCE_API_SECRET="your-secret" ``` From `SKILL-EN.md`: ```bash # Clone to standard location git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video cd ~/openclaw-video # Install dependencies npm install # Set API key export OPENAI_API_KEY="sk-your-key-here" ``` ### Technical Analysis The Skill package does not include the implementations it instructs the agent to execute. Instead, it clones the current default branch of external GitHub repositories and installs dependencies defined by those repositories. No audited commit, release artifact, cryptographic checksum, or signature is specified. Consequently, the effective payload can change after this Skill has been reviewed. A compromised repository, maintainer account, dependency manifest, or transitive dependency could introduce arbitrary code. Both Python and npm installation processes may execute package-controlled build or installation logic. Subsequent documented commands also execute scripts from the downloaded repositories. The risk is amplified because users are instructed to export sensitive exchange or OpenAI credentials in the same environment. Although remote exchange and OpenAI API access are necessary for the declared live-trading and cloud video-generation features, downloading mutable implementation code is not the minimum privilege required for those network operations. ### Attack Path 1. An attacker compromises ...[truncated 1460 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin each external repository to a specific reviewed commit hash rather than cloning and executing the default branch. 2. Prefer signed release artifacts and verify their signatures or published SHA-256 checksums before installation. 3. Pin exact dependency versions: - Use hash-locked Python requirements, such as `pip install --require-hashes`. - Commit and enforce an npm lockfile with `npm ci` instead of an unconstrained `npm install`. 4. Review dependency manifests and installation hooks before execution. 5. Disable package lifecycle scripts where feasible, for example with `npm ci --ignore-scripts`, and explicitly run only reviewed build steps. 6. Perform installation and execution in a sandbox, container, or dedicated low-privilege account. 7. Keep credentials unavailable during installation. Inject narrowly scoped credentials only into the final reviewed runtime process. 8. Use exchange API keys that disable withdrawals, restrict permitted operations, and enforce IP allowlists. 9. Separate backtesting, paper-trading, and live-trading permissions so offline functionality never receives live exchange credentials. 10. Vendor or bundle the reviewed implementation with the Skill when practical so the audited package corresponds to the executed code. ]]>
