T08 · Insecure Dependencies
Warning
- Location
- assets/skills/qmd-setup/SKILL.md:46
- Finding
- Unpinned Global Installation of a Third-Party QMD Package## Vulnerability Details **File Location**: `assets/skills/qmd-setup/SKILL.md:46-55` **Additional Locations**: `SKILL.md:300`, `scripts/patch-config.js:272-274` **Vulnerability Type**: Unverified and unpinned global dependency installation **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash ### Step 2: Install QMD **Recommended: Install with bun (faster):** ```bash bun install -g @tobilu/qmd ``` **Alternative: Install with npm:** ```bash npm install -g @tobilu/qmd ``` ``` The configuration patcher also recommends the same unpinned installation: ```js console.log("[TIP] For enhanced semantic search memory, install QMD:"); console.log(" bun install -g @tobilu/qmd"); console.log(" Then re-run this script, or use the qmd-setup skill."); ``` ### Technical Analysis The setup instructions install the latest available version of `@tobilu/qmd` globally without an exact version, lockfile, checksum, signature verification, or documented package-content review. Package manager installation can execute package lifecycle scripts and install executable files into globally accessible binary directories. Because no version is pinned, the effective code installed can change after this Skill has been reviewed. A compromised package release, maintainer account, registry entry, or transitive dependency could therefore introduce arbitrary code into the user's environment. The dependency is optional, so globally installing it is not necessary for the Skill's core file-based memory functionality. ### Attack Path 1. An attacker compromises the `@tobilu/qmd` package, one of its dependencies, or a maintainer's publishing credentials. 2. The attacker publishes a malicious package version containing an installation script or malicious runtime executable. 3. A user follows the Skill's recommendation and runs `bun install -g @tobilu/qmd` or `npm install -g @tobilu/qmd`. 4. The package manager dow ...[truncated 872 chars]
- Remediation
- ## Remediation Suggestions 1. Pin QMD to an exact, reviewed version rather than installing the latest release: ```bash npm install --global --save-exact @tobilu/qmd@REVIEWED_VERSION ``` 2. Document and verify the expected package integrity hash and registry provenance before installation. 3. Review the package's lifecycle scripts and dependency tree for the pinned release. 4. Prefer a project-local or isolated installation over a global installation. 5. Use a lockfile where the installation model permits one. 6. Disable package lifecycle scripts during installation when they are not required: ```bash npm install --ignore-scripts --save-exact @tobilu/qmd@REVIEWED_VERSION ``` 7. Keep file-based memory as the default and require explicit, informed user approval before installing this optional component. 8. Document removal and incident-response procedures for a compromised package release.
