T08 · Insecure Dependencies
- Location
SKILL.md:50- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50–52
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: Mediumbash # Install (si no existe) npm install -g @mariozechner/pi-coding-agentTechnical Analysis
The skill instructs users to install
@mariozechner/pi-coding-agentglobally without specifying an exact version, validating an integrity hash, or verifying package provenance. Consequently, the installed code depends on whichever package release the npm registry resolves at execution time.npm packages can execute lifecycle scripts during installation. If the package, its publishing account, or one of its transitive dependencies is compromised, malicious installation code could execute with the permissions of the user running npm. The global installation scope also increases exposure by placing the package in a shared executable location rather than isolating it within the project.
Attack Path
- An attacker compromises the named npm package, its maintainer account, or a transitive dependency.
- The attacker publishes a malicious release or modifies a release selected by npm's default resolution behavior.
- A user follows the skill instructions and runs the unpinned global installation command.
- npm downloads the attacker-controlled package or dependency.
- Malicious lifecycle code executes during installation, or the compromised globally installed
piexecutable runs later. - The malicious code operates with the invoking user's privileges and can access resources available to that account.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the account running npm. Depending on that account's privileges, an attacker could read or alter project files, access user-readable credentials and configuration, tamper with globally installed tooling, or compromise subsequent coding-agent operations. The instruction does not explicitly requi ...[truncated 101 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed exact version rather than allowing mutable default resolution.
- Verify package provenance, publisher identity, release signatures where available, and the expected integrity digest before installation.
- Prefer a project-local or otherwise isolated installation instead of
npm install -g. - Use a lockfile or equivalent reproducible dependency mechanism that also fixes transitive dependency versions.
- Review npm lifecycle scripts before installation and use
--ignore-scriptswhen lifecycle execution is unnecessary. - Run installation and the resulting agent under a dedicated, least-privileged account or sandbox.
- Establish an update process requiring security review before changing the pinned version.
