T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:31
- Finding
- Unpinned Third-Party Package Installation Creates Supply-Chain Execution Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 31-49 **Vulnerability Type**: Unverified and unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash Global install from npm: npm install -g justcalendar justcalendar --help From local project path: cd ~/justcalendar-cli npm install npm install -g . justcalendar --help If installing from GitHub: git clone git@github.com:AndredAlmeida/justcalendar-cli.git cd justcalendar-cli npm install npm install -g . justcalendar --help ``` ### Technical Analysis The skill directs users to install the latest available `justcalendar` npm package or clone the current state of a remote GitHub repository. Neither installation method pins a reviewed version, commit hash, lockfile state, or expected integrity digest. npm installation may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Consequently, a compromised package release, maintainer account, transitive dependency, npm registry entry, or repository branch could execute arbitrary code during installation. A global installation increases exposure because it places executable content in globally accessible npm locations. The audit found no evidence that the referenced package or repository is currently malicious. The vulnerability is the unsafe, mutable supply-chain installation procedure documented by the skill. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, a transitive dependency, or the referenced GitHub repository. 2. The attacker publishes malicious package content or adds a malicious npm lifecycle script. 3. A user or agent follows the skill and runs `npm install -g justcalendar` or clones the unpinned repository and runs `npm install`. 4. npm retrieves the attacker-controlled version and executes its lifecycle scripts. 5. The malicious code runs with the privileges of the user performing ...[truncated 646 chars]
- Remediation
- ## Remediation Suggestions - Pin `justcalendar` to a specifically reviewed version rather than installing the latest release. - For source installations, pin the repository to a full reviewed commit hash and verify that commit before installation. - Include a committed lockfile and use `npm ci` to enforce deterministic dependency resolution. - Publish and verify expected package integrity hashes or signed release provenance. - Review npm lifecycle scripts and dependency changes before updating the approved version. - Consider initially installing with lifecycle scripts disabled when compatible: ```bash npm ci --ignore-scripts ``` - Avoid recommending elevated installation privileges. - Document a controlled update and re-audit process for new package versions.
