T08 · Insecure Dependencies
Warning
- Location
- README.md:51
- Finding
- External npm Package Execution Introduces an Unreviewed Supply-Chain Boundary## Vulnerability Details **File Location**: `README.md`, lines 51–54 **Vulnerability Type**: Third-party package retrieval and execution **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash # npm — pinned release, version-synced with this repo (any OS with Python 3.8+). # The package ships the exact reviewed source: compactor.py, the bin/ wrapper and # SKILL.md (see package.json "files"). npx asks for confirmation before downloading. npx @vibo-dev/context-compactor@1.1.7 --input session.md ``` ### Technical Analysis The installation instructions offer an `npx` command that downloads and executes the externally hosted package `@vibo-dev/context-compactor@1.1.7`. The audited artifact does not contain the npm package's claimed `package.json`, executable wrapper, or package distribution contents. Consequently, the assertion that the registry package contains the reviewed source cannot be independently verified from this project artifact. Pinning the version limits unintended upgrades but does not establish the integrity or provenance of the registry artifact. If the publisher account, npm registry entry, or release process is compromised, the package associated with that version could contain code not represented in the reviewed repository. Executing it through `npx` places that external code within the user's local security context. This finding concerns the documented optional npm execution path. The included `compactor.py` itself has no third-party dependencies and does not perform network access, subprocess execution, persistence, telemetry, or privilege escalation. ### Attack Path 1. An attacker compromises the npm publisher account, package publication process, or another component of the package supply chain. 2. A malicious or otherwise divergent package is made available under the documented package identity and version. 3. A user follows the README and runs: ```bash npx @vibo-dev/context-compactor@ ...[truncated 761 chars]
- Remediation
- ## Remediation Suggestions 1. Make direct execution of the reviewed local `compactor.py` file the primary and preferred installation method. 2. Include the complete npm packaging source in the audited repository, including `package.json`, the executable wrapper, lockfiles, and the exact file inclusion configuration. 3. Add reproducible packaging checks that compare the published npm tarball against repository-generated artifacts. 4. Publish and document cryptographic integrity information or verifiable npm provenance for each release. 5. In CI, download the published tarball without executing it, inspect its file list, compare hashes against expected build outputs, and only then approve the release. 6. Advise security-sensitive users to inspect the package with `npm pack` before execution and to avoid running package tooling under elevated privileges. 7. Minimize package lifecycle behavior and explicitly verify that no unnecessary installation scripts are present.
