T08 · Insecure Dependencies
- Location
scripts/package.json:5- Finding
Unpinned Third-Party Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27andscripts/package.json:5-7
Vulnerability Type: Unpinned and mutable third-party dependency
Risk Level: MediumThe installation instructions retrieve
wyze-nodewithout specifying a version:text npm install --prefix "{baseDir}/scripts" wyze-nodeThe package manifest also permits npm to select a newer compatible release:
json "dependencies": { "wyze-node": "^2.12.2" }No dependency lockfile was present in the audited project.
Technical Analysis
The documented installation command resolves the latest available version of
wyze-node, while the caret range inpackage.jsonallows compatible releases newer than2.12.2. Without a committed lockfile, the exact package version and transitive dependency graph installed by users can change after the skill has been reviewed.npm packages and their transitive dependencies may execute lifecycle scripts during installation. A compromised maintainer account, malicious package release, or compromised transitive dependency could therefore introduce code that executes under the installing user's account. At runtime, the dependency also receives the Wyze email address, key ID, and API key and operates in the cached-token directory, making dependency integrity particularly security-sensitive.
This audit found no evidence that the currently declared
wyze-nodepackage is malicious. The finding concerns the mutable and insufficiently reproducible dependency installation process.Attack Path
- An attacker compromises
wyze-node, one of its transitive dependencies, or the associated package-publishing account. - The attacker publishes a release accepted by the unversioned setup command or the
^2.12.2version range. - A user follows the documented setup procedure or performs a fresh dependency installation.
- npm downloads the altered dependency graph and may execute attacker ...[truncated 1171 chars]
- An attacker compromises
- Remediation
View remediation
Remediation Suggestions
- Replace the caret range with an exact, reviewed package version:
json "dependencies": { "wyze-node": "2.12.2" } - Generate and commit a
package-lock.jsonso direct and transitive dependency versions and integrity hashes are reproducible. - Change the documented installation workflow to use
npm ciagainst the committed lockfile rather than installing an unconstrained package by name. - Review dependency changes before updating the lockfile, including package ownership, release provenance, lifecycle scripts, and newly introduced transitive dependencies.
- If dependency lifecycle scripts are not required, install with
npm ci --ignore-scripts; otherwise, explicitly audit all required lifecycle scripts. - Run installation and the sensor client under a dedicated, least-privileged account with access limited to the required Wyze credential and token files.
- Restrict credential and token file permissions to the owning user and use Wyze credentials with the minimum capabilities required for sensor retrieval.
- Add automated dependency scanning and lockfile integrity checks to the release process.
- Replace the caret range with an exact, reviewed package version:
