T08 · Insecure Dependencies
- Location
README.md:22- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
README.md:22-24
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code:
bash npx skills add Songhonglei/better-agent-skills -s rename-sessionTechnical Analysis
The documented installation command invokes the third-party
skillspackage throughnpxwithout specifying an exact package version or integrity value. If the package is not already available locally,npxcan retrieve its currently resolved release from the configured npm registry and execute its CLI code with the invoking user's privileges.Because package resolution is mutable, the code executed when a user follows this instruction may differ from the code available when this project was audited. The referenced GitHub repository is also not pinned to an immutable commit in this command. Consequently, compromise of the npm package, its publisher account, registry resolution, or the upstream repository could introduce unreviewed code into the installation process.
This finding concerns the documented installation path. The audited
scripts/rename_session.pyimplementation itself contains no network requests, subprocess execution, or third-party Python dependencies.Attack Path
- An attacker compromises the publisher account, release process, or another relevant part of the supply chain for the unpinned
skillspackage. - The attacker publishes a malicious release that remains compatible with the documented command.
- A user follows the README and executes
npx skills add Songhonglei/better-agent-skills -s rename-session. npxresolves and downloads the malicious or unexpectedly changed package release.- The package's CLI or lifecycle code executes with the user's privileges.
- The malicious code can access resources available to that user before, during, or instead of performing the expected Skill installation.
Impact Assess
...[truncated 462 chars]
- An attacker compromises the publisher account, release process, or another relevant part of the supply chain for the unpinned
- Remediation
View remediation
Remediation Suggestions
- Pin the installer package to an audited exact version rather than allowing mutable resolution, for example by using an explicit
skills@X.Y.Zversion. - Pin the requested repository content to an immutable commit or verified release tag if the installer supports such references.
- Publish and verify expected package and artifact integrity hashes.
- Document the expected npm publisher, registry, package version, repository commit, and verification procedure.
- Prefer installation from a locally reviewed artifact or a lockfile-controlled workflow.
- In automated environments, configure an approved registry, disable unnecessary lifecycle scripts where compatible, and run installation with a minimally privileged account.
- Re-audit package updates before changing the pinned version or repository revision.
- Pin the installer package to an audited exact version rather than allowing mutable resolution, for example by using an explicit
