T08 · Insecure Dependencies
Error
- Location
- package.json:21
- Finding
- Unpinned and inconsistently named npm dependencies allow mutable third-party code execution<![CDATA[ ## Vulnerability Details **File Location**: `package.json:21-23`; `skills/start/SKILL.md:18-20,42-55`; `skills/pull/SKILL.md:20-24`; `skills/push/SKILL.md:22-24,36-40`; `skills/status/SKILL.md:20-24`; `skills/reset/SKILL.md:26-30` **Vulnerability Type**: Supply-chain compromise through an unpinned dependency and unversioned `npx` execution **Risk Level**: High ### Vulnerable Code `package.json:21-23`: ```json "dependencies": { "@any-sync/cli": "*" } ``` `skills/start/SKILL.md:18-20`: ```bash npx any-sync auth ``` `skills/start/SKILL.md:42-55`: ```bash npx any-sync init "$HOME/.any-sync.json" "<owner/repo>" "<branch>" --preset openclaw ``` ```bash npx any-sync pull "$HOME/.any-sync.json" ".any-sync.lock" ``` `skills/pull/SKILL.md:20-24`: ```bash npx any-sync pull "<config-path>" ".any-sync.lock" ``` `skills/push/SKILL.md:22-24,36-40`: ```bash npx any-sync status "<config-path>" ".any-sync.lock" ``` ```bash npx any-sync push "<config-path>" ".any-sync.lock" ``` `skills/status/SKILL.md:20-24`: ```bash npx any-sync status "<config-path>" ".any-sync.lock" ``` `skills/reset/SKILL.md:26-30`: ```bash npx any-sync reset "<config-path>" ".any-sync.lock" ``` ### Technical Analysis The declared runtime dependency uses the wildcard version `"*"`, allowing any available version of `@any-sync/cli` to satisfy installation. This prevents reproducible dependency resolution and permits a newly published or compromised release to enter the environment without a source-code change. The skill instructions also execute the differently named `any-sync` package through unversioned `npx` commands. When a matching executable is not installed locally, `npx` may download package code from the configured npm registry at execution time. This creates a remote, mutable code-execution path that is not constrained to the dependency reviewed with this project. The mismatch between `@any-sync/cli` and `any-sync` further increases the risk that the instructions reso ...[truncated 1558 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the wildcard with an exact, audited dependency version: ```json "@any-sync/cli": "X.Y.Z" ``` 2. Commit a package-manager lockfile with integrity hashes and require deterministic, frozen-lockfile installation in release workflows. 3. Align all instructions with the actual declared package name and installed executable. 4. Invoke only the locally installed binary. If `npx` must be used, use `npx --no-install` so it fails instead of downloading unknown code. 5. Pin the package version explicitly in every command if remote resolution cannot be eliminated. 6. Review package provenance, registry ownership, lifecycle scripts, and release signatures before updating. 7. Use automated dependency review and alerting, but do not allow automated updates to execute before review and testing. ]]>
