T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Third-Party CLI Is Built and Installed System-Wide
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4 and 21-28
Vulnerability Type: Unverified and mutable third-party dependency
Risk Level: MediumVulnerable 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/text ### 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
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed, immutable Git commit or versioned release rather than cloning the mutable default branch.
- Publish an expected SHA-256 or stronger checksum for the source archive or binary and verify it before building or installing.
- Prefer signed releases or signed commits and verify signatures against a documented, trusted maintainer key.
- Pin and audit transitive Go dependencies using a committed
go.modandgo.sum; run dependency and vulnerability scanning before release. - Update the installation metadata to reference a fixed, reviewed version instead of the unversioned module path.
- Avoid administrator privileges where possible by installing into a user-controlled directory such as
$HOME/.local/bin. - 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.
- 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.
