T08 · Insecure Dependencies
Warning
- Location
- package.json:9
- Finding
- Mutable Security-Critical Runtime Dependencies## Vulnerability Details **File Location**: `package.json`, lines 9–10 **Vulnerability Type**: Supply-chain risk caused by non-exact dependency constraints **Risk Level**: Medium ```json "dependencies": { "consensus-guard-core": "^1.1.15", "tsx": "^4.20.3" } ``` The documented dependency trust model also incorrectly claims exact pinning in `SKILL.md`, lines 67–68: ```markdown - `consensus-guard-core` is the first-party consensus package used in guard execution - versions are semver-pinned in `package.json` for reproducible installs ``` ### Technical Analysis The package manifest uses caret version ranges rather than exact versions. A caret permits npm to install newer semver-compatible releases. This is especially significant for `consensus-guard-core`, which supplies security-sensitive operations such as input validation, policy-flag detection, vote aggregation, state-path resolution, decision lookup, and artifact writing. The declared trust model states that versions are pinned for reproducible installation, but the manifest does not provide that guarantee. The existing lock file illustrates dependency drift: `package.json` permits `tsx` from version 4.20.3 onward within the compatible range, while `package-lock.json` resolves version 4.21.0. The project version is also inconsistent between `package.json` version 1.1.17 and `package-lock.json` version 1.1.16. Integrity hashes in the lock file protect installations that strictly honor that lock file, but they do not eliminate the risk when consumers install the published package without the repository lock file, regenerate the lock, or run installation workflows that update compatible dependencies. ### Attack Path 1. An attacker compromises the npm account, release process, or source repository of a direct or transitive dependency. 2. The attacker publishes a malicious release that remains compatible with the caret range. 3. A user installs the skill through a workflow that does not strictly prese ...[truncated 1148 chars]
- Remediation
- ## Remediation Suggestions 1. Replace caret ranges with reviewed exact versions: ```json "dependencies": { "consensus-guard-core": "1.1.15", "tsx": "4.20.3" } ``` 2. Regenerate `package-lock.json` so its root package version and dependency resolutions match `package.json`. 3. Use `npm ci` rather than `npm install` in CI, deployment, and documented repository installation procedures. 4. Commit and protect the lock file, and fail builds when the manifest and lock file are inconsistent. 5. Review direct and transitive dependencies before upgrades, including package ownership, lifecycle scripts, provenance, and unexpected dependency changes. 6. Enable automated dependency scanning and lock-file integrity checks. 7. Run installation and execution under a minimally privileged, sandboxed account with restricted filesystem and network access. 8. Correct `SKILL.md` so its trust-model statement accurately reflects the implemented dependency policy.
