T08 · Insecure Dependencies
Error
- Location
- SKILL.md:7
- Finding
- Unpinned Third-Party Package Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 7–15 **Vulnerability Type**: Unpinned npm dependency **Risk Level**: High ### Vulnerable Code ```yaml requires: bins: - engram install: npm: engram-memory setup: | # Install Ollama and embedding model brew install ollama # macOS ollama pull nomic-embed-text ``` ### Technical Analysis The skill instructs the environment to install `engram-memory` by package name without specifying an exact version, lockfile integrity value, or verified artifact digest. Consequently, the code installed during separate deployments may differ from the code originally reviewed. npm packages can execute code through lifecycle scripts during installation and through their normal executables at runtime. If the package publisher account, registry entry, release pipeline, or one of the package's transitive dependencies is compromised, a malicious release could execute with the privileges of the user installing or invoking the skill. The project contains only `SKILL.md`; the dependency's implementation and provenance controls were not available for inspection. This finding therefore concerns the unsafe dependency-installation mechanism rather than a confirmed malicious payload in the current package. ### Attack Path 1. An attacker compromises the npm publisher, release process, package registry entry, or a transitive dependency associated with `engram-memory`. 2. The attacker publishes a malicious package version under the expected package name. 3. A user installs the skill after the malicious release becomes the version resolved by npm. 4. The unpinned declaration installs the attacker-controlled version. 5. Malicious lifecycle or runtime code executes under the installing user's account. 6. The payload may access files and credentials available to that account, alter local data, or establish additional unauthorized behavior. ### Impact Assessment Successful exploitation could provide ...[truncated 443 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `engram-memory` to an exact, audited version rather than resolving a mutable latest release. 2. Use a lockfile with registry-provided integrity hashes and verify it in deployment. 3. Verify the npm publisher, source repository, release signatures, and package provenance before installation. 4. Audit direct and transitive dependencies for known vulnerabilities and unexpected lifecycle scripts. 5. Disable npm lifecycle scripts during installation where the package does not require them. 6. Execute the package with a dedicated, least-privileged account or sandbox and restrict filesystem and network access. 7. Establish a controlled update process in which new versions are reviewed and tested before deployment. ]]>
