T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:7
- Finding
- Unpinned Third-Party CLI Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 7–10 **Vulnerability Type**: Unpinned third-party dependency and unsafe installation procedure **Risk Level**: Medium ### Vulnerable Code ```bash git clone https://github.com/FroeMic/attio-cli cd attio-cli npm install npm link ``` ### Technical Analysis The installation instructions clone the current default branch of a third-party GitHub repository without pinning a reviewed commit, immutable release tag, checksum, or signature. The subsequent `npm install` may install mutable transitive dependencies and execute package lifecycle scripts. `npm link` then exposes the resulting CLI globally in the user's npm environment. Consequently, the code executed by users can differ from the version assessed during this audit. A compromise of the upstream repository, its maintainer account, or an npm dependency could introduce arbitrary code. This is a supply-chain weakness rather than evidence that the currently referenced project is malicious. ### Attack Path 1. An attacker compromises the referenced repository, a maintainer account, or one of its npm dependencies. 2. The attacker adds malicious code or an npm lifecycle script to the mutable upstream source. 3. A user follows the documented commands and clones the compromised default branch. 4. `npm install` installs the altered dependency graph and may execute attacker-controlled lifecycle scripts. 5. The payload runs with the user's privileges and may inspect local files, environment variables, or authentication material such as `ATTIO_API_KEY`. 6. `npm link` can make the compromised executable available as the globally resolved `attio` command, extending exposure to later invocations. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user performing the installation. The accessible scope could include local files readable by that user, environme ...[truncated 319 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable commit hash or signed release rather than cloning the mutable default branch. 2. Publish and verify a cryptographic checksum or signature for the approved source archive. 3. Require a committed lockfile and use `npm ci` to reproduce the reviewed dependency graph. 4. Audit npm lifecycle scripts and use `npm ci --ignore-scripts` where lifecycle execution is unnecessary. 5. Avoid `npm link` for routine installation. Prefer a versioned package or a project-local executable with a constrained execution path. 6. Document the exact approved upstream version and establish an update-review process. 7. Use a least-privileged, revocable Attio API key and rotate it if installation occurs from an unverified source. 8. Store credential files with restrictive permissions and exclude generated workspace schema files from version control because they may reveal sensitive CRM structure.
