T08 · Insecure Dependencies
Error
- Location
- README.md:21
- Finding
- Unpinned npx Installer and Mutable Skill Update Chain<![CDATA[ ## Vulnerability Details **File Location**: `README.md:21-28` **Additional Locations**: `README.zh-CN.md:22-29`, `scripts/version-check.sh:43-45`, `SKILL.md:510-519` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```bash # global install (all projects) npx skills add dimayip/cert-lifecycle-harness -g -a claude-code # project-only install (current repo) npx skills add dimayip/cert-lifecycle-harness -a codebuddy ``` The version-check script also constructs a mutable update command: ```bash REPO_API="https://api.github.com/repos/dimayip/cert-lifecycle-harness/releases/latest" UPDATE_CMD="npx skills add https://github.com/dimayip/cert-lifecycle-harness" ``` The skill permits the agent to execute the returned command after a user asks it to update: ```markdown - ✅ If the user explicitly says "help me update" → the Agent executes `<UPDATE_CMD>` and verifies it. ``` ### Technical Analysis The installation instructions invoke `npx` without pinning the `skills` command-line package to an exact audited version. Depending on the local npm configuration and cache state, `npx` may retrieve and execute the current package version and its transitive dependencies. The skill source is also identified using a mutable repository reference instead of a release tag, commit SHA, signed artifact, or verified checksum. Consequently, the code executed during installation or update can differ from the code reviewed in this audit. Although explicit user approval is required before the agent performs an update, approval does not address supply-chain integrity. The user authorizes an operation whose effective code remains remotely mutable. ### Attack Path 1. An attacker compromises the npm package used by `npx`, one of its transitive dependencies, the associated publisher account, or the referenced source repository. 2. The attacker publishes or inserts malicious installer or skill content. 3. A user fo ...[truncated 1080 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the installer to an exact audited version: ```bash npx --yes skills@<audited-version> add ... ``` 2. Pin the skill source to a reviewed commit SHA or signed release tag rather than the repository's mutable default branch. 3. Publish checksums or signatures for release artifacts and verify them before installation. 4. Prefer a review-first installation flow: - Download the release archive without executing it. - Verify its signature and checksum. - Inspect its contents. - Copy it into the skill directory only after verification. 5. Make automatic version checks and update recommendations opt-in. 6. Never execute an update command obtained from remotely returned or locally cached text without reconstructing it from trusted constants and presenting the exact pinned target to the user. 7. Document the package registry, expected publisher identity, package version, repository commit, and verification procedure. ]]>
