T08 · Insecure Dependencies
- Location
- scripts/setup.sh:17
- Finding
- Unpinned Global Installation of a Privileged Third-Party CLI<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:17-23`; additional installation guidance at `SKILL.md:525-526` **Vulnerability Type**: Unpinned and insufficiently verified third-party dependency **Risk Level**: Medium ### Vulnerable Code ```bash # Check gog CLI echo "Checking gog CLI..." if ! command -v gog &>/dev/null; then echo "❌ gog CLI not found." echo " Install it via OpenClaw or run: npm install -g gog" exit 1 fi ``` The same unsafe installation guidance appears in the Skill documentation: ```markdown ### "gog: command not found" Install gog: `npm install -g gog` or check your OpenClaw installation — gog should be bundled. ``` ### Technical Analysis The project recommends globally installing a package identified only by the short npm package name `gog`. It does not provide: - A verified publisher or official package URL. - A pinned, audited package version. - A package integrity digest or signature. - A lockfile or reproducible installation mechanism. - A validation step confirming the installed executable's identity. A global npm installation may run package lifecycle scripts with the installing user's permissions. If the package name resolves to an unintended, compromised, or malicious release, arbitrary code can execute during installation. The resulting executable is subsequently trusted to authenticate with Google and process calendar and Gmail data. This substantially increases the consequences of a supply-chain compromise. ### Attack Path 1. A user runs `scripts/setup.sh`. 2. The script reports that `gog` is missing and recommends `npm install -g gog`. 3. npm resolves a compromised, malicious, or unintended package release. 4. Package lifecycle scripts execute with the user's local privileges during installation. 5. The installed executable is later used for `gog auth login`. 6. The malicious executable gains an opportunity to access OAuth authorization data and calendar or Gmail content processed t ...[truncated 806 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Identify the dependency by its verified official publisher, registry page, and source repository. 2. Pin installation to a specifically audited version rather than installing the latest release: ```bash npm install -g verified-package-name@X.Y.Z ``` 3. Publish and verify an expected package integrity digest or signed release artifact. 4. Prefer a project-local, lockfile-controlled dependency over a global installation where technically possible. 5. Disable unnecessary npm lifecycle scripts during installation when compatible: ```bash npm install --ignore-scripts ``` 6. Document the expected executable path, version output, publisher, and checksum. 7. Validate the installed CLI before requesting Google authentication. 8. Recommend least-privilege Google OAuth scopes and avoid granting Gmail access unless the user explicitly enables email-context functionality. ]]>
