T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned Third-Party npm Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 9-14 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ```yaml install: - id: node kind: node package: engram-memory bins: ["engram"] label: "Install Engram (npm)" ``` ### Technical Analysis The installation configuration references the third-party npm package `engram-memory` without specifying an exact version or integrity hash. Consequently, installation can resolve mutable package content that was not included in the audited project and may differ between installations. If the package, a package maintainer account, or the npm publishing process is compromised, a malicious release could be selected during installation. npm packages may execute lifecycle scripts during installation, and the installed `engram` executable subsequently runs with the privileges of the invoking user. The project does not provide a lockfile, cryptographic integrity value, vendored source, or other mechanism that binds installation to the specific dependency content reviewed by maintainers. This finding does not establish that the current `engram-memory` package is malicious. It identifies an avoidable supply-chain exposure caused by resolving an unpinned external dependency. ### Attack Path 1. An attacker compromises the `engram-memory` npm package, a maintainer account, or its release pipeline and publishes a malicious version. 2. A user installs the Skill after that release. 3. Because no exact version or integrity hash is specified, the installation process resolves the attacker-controlled package version. 4. Malicious npm lifecycle code may execute during installation, or attacker-controlled logic may execute when the agent invokes the installed `engram` binary. 5. The malicious code operates with the permissions of the installation or execution process and can access resources available to that user. ### Impact Assessment Successful exploitation could perm ...[truncated 507 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `engram-memory` to a reviewed exact version rather than allowing unconstrained resolution. 2. Verify the package against a trusted lockfile and npm integrity hash so installation fails if package content changes. 3. Review the pinned package's source, transitive dependencies, published artifacts, and npm lifecycle scripts before distribution. 4. Disable npm lifecycle scripts during installation where compatible, or explicitly audit every required script. 5. Use an approved registry and enforce package provenance or signature verification in the installation pipeline. 6. Run installation and the resulting CLI under a least-privileged account or sandbox with only the filesystem and memory-store access required for its declared function. 7. Establish dependency monitoring and a controlled update process in which new versions are reviewed before the pin is changed. ]]>
