T08 · Insecure Dependencies
- Location
SKILL.md:65- Finding
Unpinned npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:65and repeated atSKILL.md:181
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
bash npm install @inferencesh/sdkTechnical Analysis
The Skill instructs users or an agent with command-execution capability to install
@inferencesh/sdkwithout specifying an exact version. No lockfile, package integrity hash, trusted registry configuration, or source-verification procedure is provided.Consequently, npm resolves the package version from the configured registry at installation time. The installed code may differ from the version reviewed when the Skill was published. npm packages can also define lifecycle scripts that execute during installation with the privileges of the invoking user. This creates a supply-chain risk if the package publisher, publishing credentials, registry resolution, or a future package release is compromised.
The same unsafe installation instruction appears twice in the document, at lines 65 and 181.
Attack Path
- An attacker compromises the package publisher account, package repository, publishing pipeline, or registry resolution path.
- The attacker publishes a malicious version of
@inferencesh/sdkor alters the version resolved by the unpinned package specification. - A user or agent follows the Skill and runs:
bash npm install @inferencesh/sdk - npm downloads the attacker-controlled release.
- Malicious package code may execute through an installation lifecycle script or later when the SDK is imported.
- The payload operates with the permissions of the user or agent that invoked npm.
This is a conditional supply-chain exploitation path; the audited file does not establish that the current package is malicious.
Impact Assessment
Successful exploitation could allow arbitrary code execution under the invoking user's accoun ...[truncated 637 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed exact version rather than relying on the registry's latest matching release:
bash npm install --save-exact @inferencesh/sdk@<reviewed-version> - Provide and retain a reviewed
package-lock.jsoncontaining npm integrity metadata, and usenpm cifor reproducible installation. - Document the canonical package registry and upstream repository so users can verify package identity and avoid registry substitution.
- Review package contents and lifecycle scripts before approving a version.
- Where compatible with the package, disable lifecycle scripts during installation:
bash npm ci --ignore-scripts - Run dependency installation in a restricted environment with minimal filesystem access, no unnecessary credentials, and constrained network permissions.
- Add automated dependency scanning and publisher/provenance verification to the release process.
- Update both occurrences of the installation command at
SKILL.md:65andSKILL.md:181so the documentation consistently uses the hardened installation procedure.
- Pin the dependency to a reviewed exact version rather than relying on the registry's latest matching release:
