T08 · Insecure Dependencies
Warning
- Location
- skills.md:140
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `skills.md`, lines 140–144 **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: Medium ### Vulnerable Code ```markdown | Language | Package | Install Command | | --------------------- | ----------------- | ----------------------------- | | JavaScript/TypeScript | `@inferedge/moss` | `npm install @inferedge/moss` | | Python | `inferedge-moss` | `pip install inferedge-moss` | | Pipecat Integration | `pipecat-moss` | `pip install pipecat-moss` | ``` ### Technical Analysis The Skill instructs users or agents to install third-party packages without specifying reviewed versions, cryptographic hashes, or lockfiles. Consequently, package resolution depends on the latest version available from the configured npm or Python package registry at installation time. This creates a supply-chain risk because the package content can change after the Skill has been audited. If a package publisher account, registry entry, dependency, or future release is compromised, installation may introduce attacker-controlled code. Package installation can also execute package-controlled lifecycle or build hooks. Imported package code subsequently runs with the privileges of the process using the SDK. There is no evidence in the audited file that the named packages are currently malicious. The vulnerability is the absence of controls that bind installation to a reviewed and reproducible package artifact. ### Attack Path 1. An agent or user follows the installation instructions in `skills.md`. 2. The package manager resolves an unpinned package to the latest available release. 3. An attacker compromises the package, one of its transitive dependencies, its publisher account, or the relevant registry entry. 4. The compromised release is downloaded instead of the version originally reviewed. 5. Malicious code executes through installation hooks or ...[truncated 917 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version rather than allowing installation of the latest release: ```bash npm install --save-exact @inferedge/moss@REVIEWED_VERSION pip install inferedge-moss==REVIEWED_VERSION pip install pipecat-moss==REVIEWED_VERSION ``` 2. Commit and enforce ecosystem lockfiles, such as `package-lock.json` for npm and a hash-locked requirements file generated by `pip-tools` or an equivalent tool for Python. 3. Require integrity verification: - Use npm lockfile integrity metadata and reproducible installation with `npm ci`. - Use Python requirements containing `--hash` entries and install with `pip install --require-hashes`. 4. Review direct and transitive dependencies before updating pinned versions. Verify package publisher identities, official repositories, release signatures where available, and registry provenance. 5. Automate dependency vulnerability and provenance checks in CI, while requiring manual approval before lockfile updates reach production. 6. Perform package installation and execution in a sandboxed, non-privileged environment. Expose only the minimum required files, credentials, and network destinations. 7. Avoid exposing project keys during dependency installation. Supply credentials only to the runtime component that requires them, and rotate credentials if dependency compromise is suspected. ]]>
