T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:25
- Finding
- Unverified Mutable Remote Code Is Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 25-43, with subsequent execution at lines 109-135 **Vulnerability Type**: Mutable remote payload and unsafe dependency execution **Risk Level**: High ### Vulnerable Code ```bash git clone https://github.com/cooderl/wewe-rss.git ~/.openclaw/workspace/wewe-rss-main ``` ```bash curl -L "https://github.com/cooderl/wewe-rss/archive/refs/heads/main.zip" -o /tmp/wewe-rss.zip unzip -o /tmp/wewe-rss.zip -d ~/.openclaw/workspace/ rm /tmp/wewe-rss.zip ``` ```bash cd ~/.openclaw/workspace/wewe-rss-main pnpm install ``` ```bash npx prisma generate npx prisma migrate deploy pnpm run -r build pnpm run start:server ``` ### Technical Analysis The deployment retrieves the mutable default branch of an external repository instead of a reviewed, immutable commit or release. Neither the Git workflow nor the ZIP fallback verifies a commit identifier, cryptographic signature, or expected digest. The retrieved project is subsequently passed to `pnpm install`, build scripts, Prisma commands, and the server startup command. Package installation may execute dependency lifecycle scripts, while project build and startup scripts execute code defined by the remotely retrieved repository. In addition, `npx` may resolve or retrieve a package if the expected local executable is unavailable. The use of GitHub is consistent with the declared deployment function, but retrieving mutable code and executing it without integrity verification exceeds the minimum trust necessary. A reviewed release or pinned commit would provide the same functionality with substantially less supply-chain risk. ### Attack Path 1. An attacker compromises the upstream repository, its maintainer account, or a transitive package. 2. The attacker modifies the `main` branch, package metadata, lifecycle scripts, build scripts, or server code. 3. The Skill clones the changed branch or dow ...[truncated 895 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the source to a reviewed commit SHA or immutable, versioned release rather than `main`. - Publish and verify a SHA-256 digest or cryptographic signature before extracting or executing the archive. - Abort deployment when verification fails; do not silently fall back to an unverified source. - Require a committed lockfile and use `pnpm install --frozen-lockfile`. - Review dependency lifecycle scripts and consider disabling them during installation unless explicitly required. - Invoke only a verified project-local Prisma executable rather than allowing `npx` to retrieve an unexpected package. - Pin all deployment tools, including PM2, to reviewed versions. - Run installation and build operations in a restricted container or dedicated unprivileged account with minimal filesystem and network access. ]]>
