T08 · Insecure Dependencies
- Location
SKILL.md:203- Finding
Unpinned and Unaudited Executable npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 203–206
Vulnerability Type: Third-party software supply-chain risk
Risk Level: MediumVulnerable Code
bash # Dependency installation npm install contract-agent # ... # Initialize SDK contract-agent init --storage sqliteTechnical Analysis
The Skill directs the Agent to install
contract-agentfrom the npm registry without specifying an exact version, integrity hash, lockfile, verified publisher, or authoritative source repository. It then directly executes the installed CLI.Because npm packages may define lifecycle scripts, attacker-controlled code can potentially execute during installation. An unpinned dependency can also resolve to a future version that differs from the version originally reviewed. The project contains only
SKILL.md; it does not include the package implementation or other artifacts that would allow the dependency's behavior and provenance to be verified.This finding establishes an unsafe dependency-consumption pattern. The audit did not establish that the current npm package is malicious.
Attack Path
- An attacker compromises the referenced npm package or its publisher account, or causes an unsafe package version to be resolved.
- The Agent follows the documented command
npm install contract-agent. - Malicious package lifecycle code executes during installation, or attacker-controlled executable content is installed.
- The Agent runs
contract-agent init --storage sqliteand subsequent package commands. - The malicious code operates with the privileges of the Agent or user running npm and may access resources available to that account.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the installing user's privileges. Depending on the runtime environment, the affected scope may include:
- Reading or modifying files accessible to the Agent.
- Accessing locally stored identity keys and contract ...[truncated 466 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
contract-agentto an exact, security-reviewed version rather than resolving the latest compatible release. - Commit and enforce a lockfile containing registry-resolved integrity metadata.
- Document and verify the package's official npm scope, publisher identity, and source repository.
- Review the dependency source and all transitive dependencies before permitting execution.
- Use
npm ciin controlled deployments to enforce the reviewed dependency graph. - Disable package lifecycle scripts with
--ignore-scriptswhere functionality permits. If scripts are required, audit them explicitly before execution. - Verify package integrity and provenance through trusted signatures, attestations, or approved registry controls.
- Run installation and CLI commands in a sandbox with minimal filesystem and network permissions.
- Prevent the package process from accessing unrelated credentials, private keys, and sensitive host paths.
- Prefer bundling or vendoring a reviewed implementation when reproducible and policy-compliant distribution is possible.
- Pin
