T08 · Insecure Dependencies
- Location
references/10-tooling.md:22- Finding
Unpinned Third-Party Development Tools Are Installed and Executed
- Content
View full analysis
Vulnerability Details
File Location:
references/10-tooling.md:22-29
Vulnerability Type: Unpinned npm dependencies and execution of mutable third-party packages
Risk Level: MediumVulnerable Code
bash npm i -D steiger @feature-sliced/steiger-pluginbash npx steiger ./src npx steiger ./src --watchTechnical Analysis
The documented installation command does not specify exact versions for
steigeror@feature-sliced/steiger-plugin. It therefore resolves mutable package versions at installation time. The subsequentnpxcommands execute the installed tooling against the project source tree.npm package installation may also execute package lifecycle scripts. If a package, dependency, maintainer account, or newly published release is compromised, following these instructions could execute attacker-controlled code with the privileges of the developer or CI account. This conflicts with the same document's recommendation to pin versions.
Attack Path
- An attacker compromises one of the named packages, a transitive dependency, or its publishing account.
- The attacker publishes a malicious version selected by npm's unconstrained version resolution.
- A developer or CI job follows the documented
npm i -Dcommand. - Malicious code runs through an installation lifecycle script or when
npx steigerinvokes the installed executable. - The code operates with the invoking account's permissions and can access resources available to that process.
Impact Assessment
Successful exploitation could read or modify the checked-out repository and files accessible to the invoking user. In CI, the potential scope may include environment variables, build artifacts, package-registry credentials, or other secrets exposed to the job. The commands do not request elevated operating-system privileges, so impact remains bounded by the developer or CI account's existing permissions.
- Remediation
View remediation
Remediation Suggestions
- Replace unconstrained package names with reviewed, exact versions.
- Commit and review the generated lockfile.
- Use
npm ciin CI to enforce lockfile-resolved dependency integrity. - Configure automated dependency updates to require review and security checks.
- Consider disabling lifecycle scripts with
--ignore-scriptswhere compatible, then explicitly run only required trusted setup steps. - Ensure
npxdoes not download an undeclared package dynamically; execute the lockfile-installed binary through a pinned package script. - Apply the same changes to the duplicate commands in
references/09-migration-playbook.md:188-189.
