T08 · Insecure Dependencies
- Location
SKILL.md:80- Finding
Unpinned Global npm Dependency in CI Workflow
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:80
Vulnerability Type: Supply-chain exposure through an unpinned third-party dependency
Risk Level: Mediumyaml - run: npm install -g notesmd-cliTechnical Analysis
The documented CI workflow globally installs the current registry version of
notesmd-cliwithout pinning an exact version or enforcing an integrity-checked lockfile. Consequently, the code executed by the workflow can change after the Skill has been reviewed.npm package installation can also execute package lifecycle scripts with the CI runner's permissions. If the package, one of its dependencies, its maintainer account, or the package registry distribution channel is compromised, a future workflow run could execute altered code. No evidence establishes that
notesmd-cliis currently malicious; the issue is the unsafe dependency acquisition model.Attack Path
- An attacker compromises the package's publishing account, registry artifact, or transitive dependency.
- The attacker publishes a malicious version under the package version range selected by the unpinned install.
- A scheduled or manually triggered CI workflow runs
npm install -g notesmd-cli. - npm retrieves the altered release and may execute its lifecycle scripts.
- The installed package subsequently runs against the checked-out repository and Obsidian vault.
- Malicious code operates with the permissions and environment available to the CI job.
Impact Assessment
Successful exploitation could provide code execution under the CI runner identity. Depending on workflow configuration, exposed resources may include repository files, writable vault contents, environment variables, and credentials made available to the job. A writable repository token could permit unauthorized commit or content modification within that token's scope. The finding does not demonstrate privilege escalation beyond the runner' ...[truncated 23 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
notesmd-clito an audited exact version instead of selecting the latest release. - Prefer a project-local dependency recorded in
package.jsonand a committed lockfile. - Use
npm ciso dependency resolution follows the lockfile exactly. - Review package provenance, lifecycle scripts, and transitive dependencies before adoption.
- Use npm integrity and provenance verification where supported.
- Configure the workflow token with minimal permissions, such as read-only contents unless a push is required.
- Separate dependency installation from credential-bearing steps where practical.
- Use dependency monitoring and explicitly review version upgrades.
A safer pattern is:
yaml - run: npm ci - run: npx --no-install notesmd-cli daily- Pin
