T08 · Insecure Dependencies
- Location
SKILL.md:72- Finding
Unpinned npm Package Installation Creates a Mutable Supply-Chain Execution Path
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:72-78
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: HighRelevant code:
bash ## Install ```bash node -v # must be v20+ npm install -g @cirne/zmail- If
better-sqlite3fails to load (wrong Node ABI), the CLI may rebuild automatically on first run; if not, runnpm rebuild better-sqlite3using the samenodebinary that runszmail. - Global install note:
npmmay install to a directory that is not onPATH; ensure that globalbinis onPATH, or usenpx @cirne/zmailfor one-off commands.
text The same unpinned commands also appear in `SKILL.md:5`, `SKILL.md:43`, and `SKILL.md:60`. ### Technical Analysis The Skill instructs users or agents to install and execute `@cirne/zmail` without specifying an exact package version or integrity value. Both `npm install -g @cirne/zmail` and one-off execution through `npx @cirne/zmail` resolve a mutable package release from the npm registry. The audited project contains only documentation and does not include the implementation of the installed package. Consequently, the executable code that receives IMAP and OpenAI credentials is outside the reviewed artifact and may change after this Skill is approved. npm package lifecycle scripts and runtime code can execute with the privileges of the user invoking npm. The global installation recommendation also places the executable in a shared command search path, increasing the consequences of a compromised release. This is necessary only insofar as the Skill depends on the external zmail CLI. Resolving and executing the latest available version is not the minimum privilege or minimum trust approach required for that functionality; the dependency can instead be pinned and verified. ### Attack Path 1. An attacker compromises the npm publisher account, package registry entry, or a transitive dependency used by ...[truncated 1264 chars]- If
- Remediation
View remediation
Remediation Suggestions
- Pin the package to a reviewed exact version, for example
npm install --global @cirne/zmail@0.1.2, rather than resolving the latest release. - Keep the version in the installation command synchronized with the audited Skill metadata.
- Publish and verify package integrity information and npm provenance before installation.
- Prefer a project-local, lockfile-backed installation over a global installation where practical.
- Avoid unversioned
npxexecution. Ifnpxis retained, specify the exact version and prevent unexpected package resolution. - Review package lifecycle scripts and consider installing with scripts disabled when compatible, followed by an explicit, audited native dependency build step.
- Include the executable source or a verifiable source commit in the audit scope so the implementation receiving mailbox credentials can be reviewed.
- Explicitly warn users not to run the npm installation with
sudoor another elevated account.
- Pin the package to a reviewed exact version, for example
