T08 · Insecure Dependencies
- Location
references/compliance/compatibility.md:176- Finding
Unpinned npm Package Execution in License Compatibility Guidance
- Content
View full analysis
Vulnerability Details
File Location:
references/compliance/compatibility.md:176-181
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code Snippet:
markdown ### Tools for License Compliance 1. **license-checker** (npm) ```bash npx license-checker --summary ```Technical Analysis
The documentation recommends executing
license-checkerthroughnpxwithout specifying a reviewed version, requiring a local installation, or validating package integrity. When the package is not already available locally,npxcan retrieve the package and its transitive dependencies from the configured npm registry and execute them with the invoking user's privileges.The effective executable content can therefore change after this Skill has been reviewed. A compromised package release, compromised transitive dependency, malicious registry configuration, or supply-chain takeover could result in arbitrary code execution. The command does not itself demonstrate malicious intent, but it creates an unsafe dependency-execution path.
Attack Path
- An attacker compromises the
license-checkerpackage, one of its transitive dependencies, or the registry used by the victim. - The user follows the Skill's compatibility-checking guidance and runs
npx license-checker --summary. - If no suitable local copy is present,
npxresolves and downloads an unpinned package version. - npm lifecycle code or package runtime code executes under the user's account.
- Malicious code accesses resources available to that account, potentially including repository files, environment variables, credentials exposed to the process, and writable project content.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running the command. The accessible scope may include the current repository, other user-reada ...[truncated 221 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Add
license-checkeras a version-pinned development dependency under a lockfile and invoke the installed copy through a package script. - If
npxremains necessary, usenpx --no-install license-checker --summaryso the command fails rather than downloading an absent package. - Document the exact reviewed package version and verify the package-lock integrity metadata before execution.
- In automated environments, use an approved internal registry or artifact mirror and restrict lifecycle scripts where practical.
- Add an explicit warning that ordinary
npxmay download and execute remote third-party code.
- Add
