T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:25
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md:25-29` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable code:** ```markdown If the CLI is not installed, install it: ```bash npm install -g google-ads-open-cli ``` ``` ### Technical Analysis The Skill instructs the user or agent to install the latest available release of `google-ads-open-cli` globally. The package version is not pinned, no package integrity value is supplied, and the dependency's implementation is not included in the audited project. Consequently, the code ultimately executed can change after this Skill has been reviewed. Global npm installation may also execute package lifecycle scripts with the privileges of the invoking user. If the package, its publication account, or a transitive dependency is compromised, malicious installation code could run locally. This risk is particularly relevant because the installed CLI is expected to consume an OAuth2 access token and a Google Ads developer token from environment variables or from `~/.config/google-ads-open-cli/credentials.json`. Access to that product-specific credential file is necessary for the declared Google Ads reporting functionality and is not independently evidence of malicious behavior. However, installing an unverified package immediately before granting it access to those credentials creates a supply-chain exposure. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or one of the package's transitive dependencies. 2. The attacker publishes a malicious release or introduces a malicious lifecycle script. 3. A user or agent follows the Skill instructions and runs `npm install -g google-ads-open-cli`. 4. npm downloads the current, unpinned release and may execute its lifecycle scripts with the invoking user's privileges. 5. Malicious code reads Google Ads credentials from the process environment or the product-specific ...[truncated 907 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to a specifically reviewed version rather than installing the latest release: ```bash npm install --global google-ads-open-cli@<reviewed-version> ``` 2. Verify package provenance, signatures, and npm integrity metadata before installation. 3. Prefer a project-local dependency with a committed lockfile instead of a global installation. 4. Review the package and its transitive dependency tree for lifecycle scripts and known vulnerabilities. 5. Disable npm lifecycle scripts during installation where compatible: ```bash npm install --global --ignore-scripts google-ads-open-cli@<reviewed-version> ``` 6. Run the CLI with minimal filesystem and environment access. Expose only the required Google Ads credentials for the duration of the command. 7. Ensure `~/.config/google-ads-open-cli/credentials.json` has restrictive filesystem permissions and never instruct the agent to display or log its contents. 8. Consider vendoring or otherwise publishing the reviewed CLI source and a reproducible build so its effective behavior can be audited with the Skill.
