T08 · Insecure Dependencies
- Location
skill/references/tooling.md:41- Finding
Unpinned Global Third-Party Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
skill/references/tooling.md:41-43
Vulnerability Type: Unpinned global npm dependency installation
Risk Level: MediumVulnerable Code
markdown ### Installation ```bash npm install -g @fission-ai/openspec && openspec inittext ### Technical Analysis The tooling guide instructs users or agents to install `@fission-ai/openspec` globally without specifying an exact version or verifying package integrity. Consequently, npm resolves and executes whichever package version and transitive dependency graph the registry serves at installation time. npm installations may execute package lifecycle scripts, while the subsequent `openspec init` command executes the installed package directly. Both operations run with the permissions of the invoking user. Because the package version is mutable after this Skill was audited, the effective code executed by this instruction cannot be established from the audited repository alone. The global installation flag (`-g`) increases the affected scope by modifying the user's global npm environment and exposing the package executable outside the current project. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, a transitive dependency, or the relevant registry delivery path. 2. The attacker publishes a malicious version under the existing package name or introduces malicious code into a dependency resolved by that version. 3. A user or agent follows the Skill's tooling guide and runs: ```bash npm install -g @fission-ai/openspec && openspec init- npm resolves the unpinned malicious release and may execute its lifecycle scripts during installation.
- If installation succeeds, the shell immediately executes the installed
openspec initcommand. - The malicious code runs with the invoking user's permissions and may modify the global npm environment or user-accessible files.
Impact Assessment
Successful exploitation pro ...[truncated 630 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the package to a reviewed exact version rather than resolving the latest release:
bash npm install --save-dev --save-exact @fission-ai/openspec@X.Y.Z -
Prefer a project-local development dependency over global installation. Invoke it through the locally resolved executable:
bash npm exec -- openspec init -
Commit and enforce a lockfile so the complete transitive dependency graph and package integrity hashes are reproducible:
bash npm ci -
Review package provenance, publisher identity, lifecycle scripts, release history, and transitive dependencies before recommending execution.
-
Where compatible, disable lifecycle scripts during installation:
bash npm install --ignore-scripts --save-dev --save-exact @fission-ai/openspec@X.Y.Z -
Require explicit user confirmation before installing third-party software, particularly global packages.
-
Run the installation and initialization in a restricted environment without sensitive credentials, elevated privileges, or unnecessary filesystem access.
-
