Back to skill

Security audit

Bit URL Shortener

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for managing Bit short links, but it asks users to install an unpinned third-party CLI system-wide and then use it with an API key that can change or delete link data.

Review and pin the bit-cli source before installing, prefer a user-local install over sudo placement in /usr/local/bin, and use a narrowly scoped Bit API key. Treat update and delete commands carefully because they can affect live short links and click data access.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

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.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
git clone https://github.com/ParinLL/bit-cli.git
cd bit-cli
go build -o bit .
sudo mv bit /usr/local/bin/
```

- Review the repository before building from source.
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- `BIT_API_URL` (optional): Bit API base URL, default `http://localhost:4000`.
- Permission requirements:
- The `bit` executable must be callable from PATH.
- Installing to `/usr/local/bin` with `sudo mv` requires administrator privileges.
- If the target API is remote, network connectivity to that API is required.

## Using The `bit` Binary
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This markdown file documents `bit delete <id>` as removing a short link, but it does not include any explicit warning that the action deletes data or may be irreversible. For markdown files, the skill description should warn about behaviors that could affect user data or system integrity.

Static analysis

No suspicious patterns detected.