T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:38
- Finding
- Unpinned globally installed dependency is trusted with sensitive credentials<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:38-40`, `references/cli-usage.md:3-6`, `scripts/snappwd-share.sh:7-15` **Vulnerability Type**: Supply-chain exposure through an unpinned security-critical dependency **Risk Level**: Medium ### Vulnerable Code `SKILL.md:38-40`: ```bash # Install if needed npm install -g @snappwd/cli ``` `references/cli-usage.md:3-6`: ```bash ## Installation ```bash npm install -g @snappwd/cli ``` ``` `scripts/snappwd-share.sh:7-15`: ```bash # Check if snappwd-cli is installed if ! command -v snappwd &> /dev/null; then echo "Error: snappwd-cli is not installed." echo "" echo "Install it with:" echo " npm install -g @snappwd/cli" echo "" echo "Or use the web interface at: https://snappwd.io" exit 1 fi ``` ### Technical Analysis The Skill directs users to install the latest available version of `@snappwd/cli` globally without pinning a reviewed version or verifying package integrity. The installed CLI is subsequently entrusted with passwords, API tokens, credential files, and potentially SSH private keys. The implementation of that package is not included in the audited project. Consequently, this audit cannot verify whether the CLI generates keys securely, encrypts before upload, sends data only to the documented endpoint, avoids telemetry, or protects plaintext while processing it. Global npm installation may also run package lifecycle scripts. If the package, its maintainer account, or a transitive dependency is compromised, installation can execute attacker-controlled code under the installing user's privileges. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or one of its transitive dependencies. 2. The attacker publishes a modified version under the same package name. 3. A user follows the Skill's unpinned `npm install -g @snappwd/cli` instruction. 4. npm retrieves and installs the compromised release and may execute its lifecycle scripts ...[truncated 784 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a specifically reviewed version rather than installing the latest release: ```bash npm install --global @snappwd/cli@<reviewed-version> ``` 2. Document the expected package checksum, provenance, and official registry source. 3. Use npm provenance/signature verification where supported. 4. Review and lock all transitive dependencies of the security-critical CLI. 5. Prefer a project-local installation with a committed lockfile over global installation. 6. Consider vendoring or bundling an independently audited client so the effective implementation is available during Skill review. 7. Disable package lifecycle scripts during installation where compatible, and document any scripts that are strictly required. 8. Warn users not to submit valuable credentials until the installed binary and version have been verified. ]]>
