T08 · Insecure Dependencies
Error
- Location
- install.sh:3
- Finding
- Conflicting and Unpinned Globally Installed npm Dependency## Vulnerability Details **File Location**: `install.sh:3`; related conflicting declarations in `SKILL.md:9` and `SKILL.md:18` **Vulnerability Type**: Supply-chain ambiguity and unsafe dependency resolution **Risk Level**: High ### Vulnerable Code `install.sh:1-4`: ```bash #!/bin/bash # Install notioncli globally npm install -g notioncli echo "✅ notioncli installed. Run: notion init --key \$NOTION_API_KEY" ``` Conflicting package declarations in `SKILL.md`: ```yaml install: "npm install -g @jordancoin/notioncli" ``` ```bash npm install -g notioncli ``` ### Technical Analysis The metadata identifies the scoped package `@jordancoin/notioncli`, whereas the executable installation script and Setup documentation install the distinct unscoped package `notioncli`. This inconsistent package identity can cause users to install a different package from the one represented by the Skill metadata. Neither installation command pins an exact version or verifies package integrity. npm therefore resolves the current registry version at installation time. In addition, `npm install` can execute package lifecycle scripts. Because installation is global, such scripts run with the installing user's permissions and can place executable files in global npm paths. The third-party CLI implementation is not included in this project, so its install-time and runtime behavior cannot be verified by this audit. ### Attack Path 1. A user runs `install.sh` or follows the Setup command in `SKILL.md`. 2. npm resolves the mutable, unscoped `notioncli` package rather than the scoped package declared in metadata. 3. A malicious, compromised, or unintended release executes npm lifecycle scripts during global installation. 4. The installed executable gains the installing user's privileges and may modify files accessible to that user. 5. The user subsequently invokes the CLI with a Notion API key, potentially exposing that credential and its authorized workspace data to the installed packag ...[truncated 459 chars]
- Remediation
- ## Remediation Suggestions - Use one verified package identity consistently in metadata, documentation, and installation scripts. - Pin an exact reviewed version, for example `@scope/package@1.2.1`, rather than resolving the latest release. - Commit and verify a lockfile and package integrity metadata where the installation model permits it. - Prefer a project-local installation over `npm install -g` to reduce system-wide effects. - Review package provenance, ownership, signatures, published contents, and lifecycle scripts before installation. - Disable lifecycle scripts with `--ignore-scripts` when they are not required. - Execute the CLI with least privilege and never run the installation as root. - Re-audit the exact dependency source and version before presenting the Skill as trusted.
