T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned and Unverifiable Third-Party npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 17-20 **Vulnerability Type**: Supply-chain exposure through an unpinned third-party dependency **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown ### Via npm ```bash npm install @raghulpasupathi/dom-observer-pro ``` ``` ### Technical Analysis The installation command retrieves the current registry-selected release of `@raghulpasupathi/dom-observer-pro` without pinning an exact version or verifying an integrity hash. The audited project does not include the dependency's source code, a lockfile, a package integrity value, or provenance information that would allow the installed artifact to be matched to reviewed code. npm packages can define lifecycle scripts that execute during installation. Package code also executes with the permissions of the application or browser-extension environment when imported. Consequently, compromise of the package publisher, registry account, or distribution artifact could change the code users receive after this Skill document has been reviewed. This finding establishes an insecure and unverifiable dependency installation path; it does not establish that the named package is itself malicious. ### Attack Path 1. An attacker compromises the package publisher account or otherwise causes a malicious release to be distributed under the referenced package name. 2. The attacker adds malicious lifecycle scripts or modifies the package's runtime implementation. 3. A user follows the documented unpinned `npm install` command. 4. npm resolves and downloads the attacker-controlled release because no exact version or integrity constraint is specified. 5. Malicious lifecycle code may execute during installation, or malicious runtime code executes when the package is imported. 6. The payload operates with the installing process's user privileges and may access files, environment variables, application data, or browser-observ ...[truncated 693 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed, immutable version rather than relying on the registry-selected latest release. 2. Commit a package lockfile containing the expected resolved version and integrity hash. 3. Include or link to the exact auditable source revision corresponding to the distributed package. 4. Verify npm registry provenance and publisher identity before recommending installation. 5. Review the package's lifecycle scripts and runtime code before use. 6. Use `npm install --ignore-scripts` where lifecycle scripts are unnecessary, followed by explicit execution of only reviewed setup steps. 7. Run installation and package code under a non-privileged account with restricted filesystem, environment-variable, and network access. 8. For browser-extension use, apply least-privilege host and extension permissions and prevent observed DOM content from being transmitted unless explicitly required and disclosed. 9. Add automated dependency scanning and monitor the pinned release for publisher, integrity, and vulnerability changes.
