T08 · Insecure Dependencies
Warning
- Location
- README.md:29
- Finding
- Unpinned Third-Party Package Execution During Installation## Vulnerability Details **File Location**: `README.md`, line 29 **Vulnerability Type**: Supply-chain risk caused by unpinned remote package execution **Risk Level**: Medium **Vulnerable Code**: ```bash npx add https://github.com/wpank/ai/tree/main/skills/tools/logging-observability ``` ### Technical Analysis In standard `npx` command syntax, `add` is resolved as the package or executable to download and run. The command does not pin that package to an exact version or verify its integrity. Consequently, the code executed at installation time may differ from the code reviewed in this project. The supplied GitHub URL also references a mutable branch path rather than an immutable commit. Both the executable package resolution and the requested repository content therefore depend on externally controlled, changeable sources. This creates a supply-chain execution risk: if the resolved npm package, its transitive dependencies, its publisher account, or the mutable upstream repository is compromised, following the documented installation command could execute attacker-controlled code. The actual installer implementation is not included in the audited project, so its behavior cannot be verified from the available files. ### Attack Path 1. An attacker compromises or maliciously updates the npm package resolved as `add`, one of its executable dependencies, or the referenced mutable upstream source. 2. A user follows the installation instructions in `README.md`. 3. `npx` resolves and downloads the unpinned package from the configured npm registry. 4. The downloaded package and any applicable lifecycle or command logic execute with the privileges of the user running `npx`. 5. Malicious code can access resources available to that user, modify local files, invoke network services, or install altered Skill content. ### Impact Assessment Successful exploitation permits arbitrary code execution with the privileges of the user perf ...[truncated 576 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the ambiguous `npx add ...` command with a documented installer whose package name and purpose are explicit. 2. Pin every executable npm dependency to an exact reviewed version rather than a tag or version range. 3. Commit and enforce package lockfiles and integrity metadata where package installation is required. 4. Pin repository sources to a full immutable commit hash rather than a branch path. 5. Prefer a non-executable installation method, such as cloning a pinned commit and copying the reviewed Skill directory, when no installer logic is necessary. 6. Document the expected package publisher and registry, and verify package provenance or signatures before execution. 7. Run any unavoidable installer in a restricted environment with minimal filesystem access, no unnecessary credentials, and no administrative privileges. 8. Update the installation documentation to show the exact expected artifact and checksum so users can verify it before use.
