T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Global npm Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 14–20 and 32–36 **Vulnerability Type**: Supply-chain exposure through an unpinned npm dependency **Risk Level**: Medium ### Vulnerable Code ```json { "id": "node", "kind": "node", "package": "ntn", "bins": ["ntn"], "label": "Install official Notion CLI (npm)", }, ``` ```bash npm install -g ntn ntn --version ntn login ``` ### Technical Analysis The skill installs the `ntn` package globally from the npm registry without specifying an exact version or verifying its integrity. Consequently, the package contents installed during future skill setup operations are determined by whichever release the registry resolves at that time, rather than the release reviewed when this skill was audited. Global npm installation may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. If the package, a transitive dependency, its publisher account, or the package distribution channel is compromised, malicious installation code could execute with the privileges of the user performing setup. The globally installed `ntn` executable is subsequently trusted for authentication and Notion API operations. This finding does not establish that the current `ntn` package is malicious. It identifies the absence of version pinning and integrity controls as an exploitable supply-chain weakness. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or a transitive dependency associated with `ntn`. 2. The attacker publishes a malicious version that is accepted by the unpinned package reference. 3. A user or automated installer processes the skill metadata or follows the documented `npm install -g ntn` command. 4. npm downloads the attacker-controlled release and may execute its lifecycle scripts during installation. 5. The malicious package executes with the installing user's privileges and in ...[truncated 919 chars]
- Remediation
- ## Remediation Suggestions - Pin `ntn` to a reviewed exact version in both installation metadata and documentation, for example: ```json "package": "ntn@<reviewed-exact-version>" ``` ```bash npm install -g --ignore-scripts ntn@<reviewed-exact-version> ``` - Verify the selected package version, publisher, provenance, dependency tree, and published integrity digest before recommending it. - Prefer a lockfile-backed, project-local installation over a mutable global installation where the execution environment supports it. - Use npm provenance or equivalent signed-artifact verification when available. - Disable lifecycle scripts with `--ignore-scripts` if the reviewed CLI does not require them. - Do not run npm installation with `sudo` or an administrative account. - Execute the CLI under a dedicated least-privileged account and use a narrowly scoped Notion integration token. - Separate installation from authentication so secrets are not present while unreviewed installation code is executing. - Establish a controlled dependency-update process in which each new pinned release is reviewed and tested before updating the skill.
