T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:52
- Finding
- Unpinned Global Installation and Execution of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 52–56 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```bash npm install -g @builtbyecho/echo-gate echo-gate ``` ### Technical Analysis The skill directs users to globally install the latest available version of `@builtbyecho/echo-gate` from the npm registry and then execute its command-line interface. The dependency is not pinned to an exact reviewed version, no integrity hash or lockfile is supplied, and the package implementation is absent from the audited project. npm installation may execute package lifecycle scripts. A global installation also makes the package's executable broadly available in the user's environment. Consequently, the effective code executed by these instructions can change after this skill has been reviewed. Although the scoped package name and referenced GitHub repository reduce typographical-squatting risk, they do not establish package integrity or reproducible installation. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or a transitive dependency. 2. The attacker publishes a malicious version under `@builtbyecho/echo-gate` or causes malicious code to enter its dependency graph. 3. A user follows the skill's unpinned `npm install -g` instruction. 4. npm retrieves the currently resolved package and dependencies rather than a specifically reviewed artifact. 5. Malicious code executes through an installation lifecycle script or when the user runs `echo-gate`. 6. The malicious process accesses data and credentials available to the installing user, potentially including Echo Gate environment variables. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user performing the installation. The affected scope may include: - Files readable or writable by that user. - Environmen ...[truncated 609 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version rather than installing the moving latest release: ```bash npm install --save-exact @builtbyecho/echo-gate@<reviewed-version> ``` 2. Prefer a project-local, lockfile-backed installation over a global installation, and commit the generated lockfile. 3. Use `npm ci` in controlled deployments to enforce the dependency graph recorded in the lockfile. 4. Verify npm package provenance, publisher identity, signatures or attestations, and registry integrity metadata before installation. 5. Audit both the package and its transitive dependencies for lifecycle scripts and known vulnerabilities. 6. Disable lifecycle scripts during installation where operationally feasible, then explicitly execute only reviewed build steps: ```bash npm ci --ignore-scripts ``` 7. Run installation and execution under a least-privileged account without unnecessary secrets in the environment. 8. Avoid exposing `ECHO_GATE_ADMIN_TOKEN`, `ECHO_GATE_KEY`, and unrelated credentials to package installation processes. 9. Document the expected package checksum, source revision, and supported version so users can verify that the installed artifact matches the audited release.
