T08 · Insecure Dependencies
Warning
- Location
- scripts/run.sh:51
- Finding
- Unpinned External Repository Is Built and Executed<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.sh`, lines 51–63 **Vulnerability Type**: Unverified and unpinned third-party source dependency **Risk Level**: Medium ### Vulnerable Code ```bash if [[ ! -d "$REPO_DIR" ]]; then echo "Error: qwen-asr repo not found at $REPO_DIR. Run: git clone https://github.com/antirez/qwen-asr ~/.openclaw/workspace/qwen-asr" >&2 exit 1 fi if [[ ! -x "$BIN" ]]; then echo "Warning: qwen_asr binary not found. Building with 'make blas'..." >&2 cd "$REPO_DIR" make blas 2>&1 || { echo "Build failed."; exit 1; } fi ``` ### Technical Analysis The script instructs the user to clone the current default revision of an external GitHub repository without specifying an audited release, tag, or commit. It does not verify the repository revision, source integrity, release signature, or expected file checksums before running `make blas`. A Makefile is executable code for security purposes. Its recipes can invoke arbitrary commands with the privileges of the user running the skill. Consequently, a compromised upstream repository, an unexpected upstream change, or local modification of the repository can result in arbitrary commands being executed during the automatic build. The script also executes the resulting `qwen_asr` binary without verifying its provenance or integrity. This issue is limited to the dependency build and execution flow; the audited skill itself does not directly download or embed a malicious payload. ### Attack Path 1. An attacker compromises the referenced upstream repository, influences the revision obtained by the user, or tampers with the local repository at `~/.openclaw/workspace/qwen-asr`. 2. The attacker adds malicious commands to the Makefile or replaces source files used to produce `qwen_asr`. 3. The user follows the displayed unpinned `git clone` instruction. 4. When `qwen_asr` is absent or non-executable, the skill automatically enters the repository and runs `make blas`. 5. The ...[truncated 581 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specific audited commit hash or immutable signed release rather than the repository's default branch. 2. Update the installation instruction to clone and check out that exact revision, for example: ```bash git clone https://github.com/antirez/qwen-asr.git "$REPO_DIR" git -C "$REPO_DIR" checkout --detach <audited-commit-hash> ``` 3. Before building, verify that `git -C "$REPO_DIR" rev-parse HEAD` exactly matches the approved commit. 4. Verify signed release tags where supported and publish expected checksums for source archives and compiled artifacts. 5. Refuse to build if the repository contains uncommitted modifications or an unexpected remote URL. 6. Prefer distributing a reproducibly built, checksum-verified binary or vendoring an audited dependency version. 7. Verify the final executable's checksum before every execution, especially when it resides in a user-writable workspace. 8. Build in a restricted environment with minimal filesystem and network access to reduce the impact of compromised build scripts. ]]>
