T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Third-Party CLI Installed from a Mutable Git Tag<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 17-19; the same command also appears in metadata on line 6 **Vulnerability Type**: Supply-chain risk from a mutable external dependency reference **Risk Level**: Medium ### Vulnerable Code ```bash # SKILL.md:17-19 ```bash npm install -g github:0xmythril/tweet-cli#v1.0.0 ``` ``` ### Technical Analysis The Skill directs users to install a globally available executable directly from a third-party GitHub repository. Although the reference resembles a fixed version, `v1.0.0` is a Git tag rather than an immutable commit hash. A repository administrator or an attacker who compromises the upstream repository may move or recreate that tag so that it resolves to different code after this Skill has been reviewed. The executable's implementation is not included in the audited project. Consequently, the claims that it has no installation scripts, no telemetry, and only the documented dependencies cannot be independently verified from the available artifact. Global installation increases exposure by placing the executable in a shared command search path for the current environment. The CLI is also expected to receive X API credentials, making upstream integrity particularly important. ### Attack Path 1. An attacker compromises the upstream `0xmythril/tweet-cli` repository or an authorized maintainer account. 2. The attacker moves or recreates the `v1.0.0` tag so it references malicious code. 3. A user follows the Skill instructions and executes the global npm installation command. 4. npm retrieves content currently referenced by the mutable tag. 5. Malicious package lifecycle code, if introduced, may execute during installation. Otherwise, the malicious CLI executes when the user invokes `tweet-cli`. 6. The altered CLI can access the user's X API credentials and act with the permissions granted to those credentials. ### Impact Assessment Successful exploitation can execute code with the privileg ...[truncated 482 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the mutable Git tag with an audited, immutable full commit hash. 2. Prefer a verified registry artifact with lockfile or integrity-hash validation where possible. 3. Record the expected commit and package integrity value in the Skill documentation. 4. Inspect the resolved `package.json`, lifecycle scripts, bundled files, and dependency tree before installation. 5. Avoid global installation where practical. Use a project-local installation or an isolated execution environment with a restricted command path. 6. Verify the upstream source and release signatures before running the CLI. 7. Restrict the X application's authorization scope to only the operations required for posting. 8. Rotate all X API credentials immediately if an unverified or compromised build has been executed. ]]>
