T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Third-Party CLI Is Built and Installed System-Wide## Vulnerability Details **File Location**: `SKILL.md`, lines 4 and 21-28 **Vulnerability Type**: Unverified and mutable third-party dependency **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw": {"requires": {"bins": ["bit", "git", "go", "sudo"], "env": ["BIT_API_KEY"]}, "primaryEnv": "BIT_API_KEY", "install": [{"id": "go-install", "kind": "go", "label": "Install bit via Go", "bins": ["bit"], "module": "github.com/ParinLL/bit-cli"}]}} ``` ```markdown ## Installation (GitHub) - Install source: `https://github.com/ParinLL/bit-cli` - Install from GitHub: ```bash git clone https://github.com/ParinLL/bit-cli.git cd bit-cli go build -o bit . sudo mv bit /usr/local/bin/ ``` ``` ### Technical Analysis The skill directs users and installation automation to obtain and build a third-party Go project without pinning an immutable release, tag, commit hash, checksum, or cryptographic signature. The `git clone` operation therefore retrieves the current state of the repository's default branch, while the metadata similarly identifies an unversioned Go module. This creates a supply-chain trust boundary in which the code built by a user may differ from the code reviewed during the skill audit. A compromise of the upstream repository, maintainer account, release process, or relevant transitive dependencies could introduce attacker-controlled code into the resulting executable. The instruction to review the repository is useful guidance but is not an enforceable integrity control. The compiled executable is also copied into `/usr/local/bin`, making it available through a system-wide executable search path. When subsequently invoked, it is expected to receive access to `BIT_API_KEY` and communicate with the configured Bit API endpoint. ### Attack Path 1. An attacker compromises the mutable upstream repository, its maintainer account, or a dependency used during the Go build. 2. The attacker inserts m ...[truncated 1375 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable Git commit or versioned release rather than cloning the mutable default branch. 2. Publish an expected SHA-256 or stronger checksum for the source archive or binary and verify it before building or installing. 3. Prefer signed releases or signed commits and verify signatures against a documented, trusted maintainer key. 4. Pin and audit transitive Go dependencies using a committed `go.mod` and `go.sum`; run dependency and vulnerability scanning before release. 5. Update the installation metadata to reference a fixed, reviewed version instead of the unversioned module path. 6. Avoid administrator privileges where possible by installing into a user-controlled directory such as `$HOME/.local/bin`. 7. If system-wide installation is required, build and verify the artifact as an unprivileged user, then use elevated privileges only for the final copy with explicit ownership and permission settings. 8. Execute the CLI with a narrowly scoped API key that permits only the operations required by the user, and rotate the key if dependency compromise is suspected.
