T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Third-Party npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 25
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code Snippet:
markdown 1. Install: `npm i @fidacy/session` (free; anchoring needs a free API key from https://app.fidacy.com/signup, scope assess:write).Technical Analysis
The installation instruction does not specify an exact version of
@fidacy/sessionor provide a lockfile with an integrity hash. Consequently, npm resolves the package version from the registry at installation time. The resulting code may differ from the version that was originally reviewed or intended by the Skill author.The dependency implementation is not included in this project, so its npm lifecycle scripts, runtime network behavior, hashing implementation, conversation-data handling, and API-key handling cannot be verified by this audit. Because npm packages can execute lifecycle scripts during installation and application code at runtime, a compromised package publisher, registry account, or later package release could introduce attacker-controlled code.
Attack Path
- An attacker compromises the package publisher, registry account, release pipeline, or another component of the dependency supply chain.
- The attacker publishes a malicious or compromised release under the existing
@fidacy/sessionpackage name. - A user follows the documented
npm i @fidacy/sessioninstruction after that release becomes the version selected by npm. - npm downloads and installs the changed package without validating it against a project-supplied exact version and integrity lock.
- Malicious lifecycle code may execute during installation, or malicious package logic may execute when the application imports and uses the dependency.
- The malicious code runs with the privileges and environmental access of the npm or application process.
Impact Assessment
Success ...[truncated 739 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
@fidacy/sessionto a reviewed exact version instead of allowing npm to select a mutable release. - Provide a committed
package-lock.jsonor equivalent lockfile containing registry integrity hashes. - Install dependencies through a reproducible command such as
npm ci. - Document the expected official package registry and upstream source repository.
- Review package contents and npm lifecycle scripts before approving a version.
- Consider disabling lifecycle scripts during installation with
npm ci --ignore-scriptswhen they are not required. - Run installation and application processes with least privilege, restricted filesystem access, limited outbound networking, and narrowly scoped secrets.
- Use dependency monitoring and automated alerts for ownership changes, compromised releases, known vulnerabilities, and unexpected package updates.
- Verify that the SDK transmits only the documented digest and does not expose conversation content or credentials before using it with sensitive conversations.
- Pin
