T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md:14` and duplicated in `README.md:9` **Vulnerability Type**: Unpinned third-party dependency and unclear package provenance **Risk Level**: Medium ### Vulnerable Code `SKILL.md:14`: ```bash npm install -g @iansinnott/notion-cli ``` The same installation instruction appears in `README.md:9`. ### Technical Analysis The project instructs users to install the latest available version of `@iansinnott/notion-cli` globally. It does not pin an exact reviewed version, verify a package integrity hash, provide a lockfile, or recommend disabling npm lifecycle scripts. A global npm installation can execute package lifecycle scripts with the privileges of the user running npm. Because no version is pinned, the effective code installed can change after this Skill has been reviewed. A compromised maintainer account, malicious newly published release, or package registry compromise could therefore introduce arbitrary executable behavior. Package provenance is also unclear in the audited documentation. The installed npm package is scoped as `@iansinnott/notion-cli`, while the declared homepage and reference repository are `https://github.com/litencatt/notion-cli`. The documentation does not establish or verify that the npm scope and referenced repository are controlled by the same trusted publisher. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another relevant supply-chain component. 2. The attacker publishes a malicious version of `@iansinnott/notion-cli`. 3. A user follows the Skill instructions and runs the unpinned global installation command. 4. npm downloads the current malicious release and may execute its lifecycle scripts during installation. 5. The malicious package executes with the user's privileges. 6. It can access local files and environment variables available to the process, potentially including `NOTION_TOKEN ...[truncated 815 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to an exact reviewed version instead of installing the latest release: ```bash npm install -g @iansinnott/notion-cli@<reviewed-exact-version> ``` - Verify and document the relationship between the npm publisher, package scope, and referenced GitHub repository. - Publish expected package integrity information and verify the downloaded artifact before installation. - Review the selected package version, including its dependencies and npm lifecycle scripts. - Prefer a project-local or otherwise isolated installation rather than modifying the user's global npm environment. - Use `--ignore-scripts` when compatible with the package and required functionality. - Apply dependency monitoring and require security review before updating the pinned version. - Run the CLI with a minimally privileged Notion integration and in an isolated environment where practical.
