T08 · Insecure Dependencies
Warning
- Location
- package.json:5
- Finding
- Non-Reproducible Dependency Installation Without a Lockfile## Vulnerability Details **File Location**: `package.json:5-7`; `SKILL.md:87,95` **Vulnerability Type**: Unpinned third-party dependency and non-reproducible installation **Risk Level**: Medium ### Vulnerable Code ```json "dependencies": { "axios": "^1.6.0" } ``` The installation documentation instructs users to run: ```bash npm install ``` No `package-lock.json` is included in the audited project. ### Technical Analysis The caret version range permits npm to install later compatible Axios releases rather than a single audited version. The absence of a lockfile also leaves transitive dependencies unconstrained. Consequently, two installations performed at different times may produce materially different dependency trees. This is a supply-chain weakness rather than evidence that the current Axios package is malicious. If a permitted future release or transitive package is compromised, installation may introduce code that was not present during the audit. Depending on package metadata, lifecycle scripts could also execute during installation. ### Attack Path 1. An attacker compromises a dependency release or one of its transitive dependencies. 2. The compromised version remains compatible with the declared `^1.6.0` range. 3. A user follows the documentation and executes `npm install`. 4. npm resolves and downloads the unaudited version. 5. Malicious lifecycle or runtime code executes with the privileges of the installing or invoking user. 6. Because the search process can access `BAIDU_API_KEY`, compromised runtime code could potentially read and disclose that credential. ### Impact Assessment Exploitation could execute arbitrary JavaScript with the privileges of the account installing or running the skill. Potential scope includes access to the skill process environment, the local API-key configuration, files accessible to that account, and outbound network connectivity. No current malicious depend ...[truncated 35 chars]
- Remediation
- ## Remediation Suggestions 1. Pin Axios to a specifically reviewed version instead of using a caret range. 2. Generate, review, and commit `package-lock.json`. 3. In deployment and automated installation workflows, use `npm ci` rather than `npm install`. 4. Run dependency vulnerability and integrity checks during release preparation. 5. Consider disabling lifecycle scripts with `npm ci --ignore-scripts` if the dependency tree does not require them. 6. Periodically update dependencies through a controlled review process rather than resolving new versions implicitly.
