T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:23
- Finding
- Unpinned Remote Repository Is Retrieved and Executed## Vulnerability Details **File Location**: `SKILL.md`, lines 23-58 **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: High ```bash if [ -d "$HOME/.openclaw/linux-cron-panel" ]; then # 已安装,启动服务 cd "$HOME/.openclaw/linux-cron-panel" bash start.sh else # 未安装,执行安装 git clone https://github.com/wdmywm3/linux-cron-panel.git "$HOME/.openclaw/linux-cron-panel" # 配置 systemd 服务 mkdir -p "$HOME/.config/systemd/user" cat > "$HOME/.config/systemd/user/linux-cron-panel.service" << 'SERVICE_EOF' [Unit] Description=Linux Cron Panel API Service After=network.target [Service] Type=forking WorkingDirectory=%h/.openclaw/linux-cron-panel ExecStart=bash start.sh Restart=always RestartSec=10 TimeoutStopSec=30 [Install] WantedBy=default.target SERVICE_EOF # 启动服务 systemctl --user daemon-reload systemctl --user enable --now linux-cron-panel fi ``` ### Technical Analysis The installation procedure clones a mutable third-party GitHub repository and executes its `start.sh` script without pinning an immutable commit, validating a cryptographic checksum, or verifying a trusted signature. Both the direct `bash start.sh` invocation and the systemd `ExecStart` directive execute files controlled by that external repository. Consequently, the effective code executed by the Skill can change after the Skill itself has been reviewed. Compromise of the upstream account, repository, release process, DNS/TLS trust chain, or a malicious upstream update could turn the installation process into arbitrary code execution. The existing-directory branch also executes the local `start.sh` without confirming its integrity. A previously modified checkout could therefore be executed again. ### Attack Path 1. An attacker compromises the referenced GitHub repository or gains permission to modify its default branch. 2. The attacker modifies `start.sh` or another file invoked by it to contain a malicious payload. 3. A user invokes the Ski ...[truncated 994 chars]
- Remediation
- ## Remediation Suggestions 1. Do not clone and execute the mutable default branch. Pin installation to a reviewed, immutable commit hash or a specific signed release. 2. Verify downloaded content using a cryptographic checksum obtained through a trusted channel, or require a valid signature from an explicitly trusted maintainer key. 3. Vendor the minimum reviewed implementation into the package where feasible, allowing the executed code to be audited together with the Skill. 4. Require explicit user confirmation before downloading or executing third-party code. 5. Execute the service with a dedicated, minimally privileged account or a strongly sandboxed user service. 6. Add systemd hardening controls appropriate to the application, such as `NoNewPrivileges=yes`, `PrivateTmp=yes`, `ProtectSystem=strict`, `ProtectHome=read-only`, and narrowly scoped `ReadWritePaths`. 7. Before executing an existing installation, verify that its commit and relevant file hashes match the approved version. 8. Document the precise external code being trusted and provide a controlled update process rather than silently consuming upstream changes.
