Back to skill

Security audit

Google Ads CLI

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Google Ads reporting skill that uses a read-only CLI and expected Google Ads credentials, with supply-chain and data-handling cautions for users.

Install only if you trust the google-ads-open-cli package and are comfortable letting it query Google Ads data available to your OAuth and developer tokens. Prefer a pinned or reviewed package version, keep credentials out of shared logs, and expose only the account credentials needed for the task.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

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.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Credential Access

High
Category
Privilege Escalation
Content
## Authentication

The CLI requires two credentials: an **OAuth2 access token** and a **developer token**. Credentials are resolved in this order:

1. `--credentials <path>` flag (per-command)
2. Environment variables: `GOOGLE_ADS_ACCESS_TOKEN` + `GOOGLE_ADS_DEVELOPER_TOKEN`
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
## Authentication

The CLI requires two credentials: an **OAuth2 access token** and a **developer token**. Credentials are resolved in this order:

1. `--credentials <path>` flag (per-command)
2. Environment variables: `GOOGLE_ADS_ACCESS_TOKEN` + `GOOGLE_ADS_DEVELOPER_TOKEN`
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
1. `--credentials <path>` flag (per-command)
2. Environment variables: `GOOGLE_ADS_ACCESS_TOKEN` + `GOOGLE_ADS_DEVELOPER_TOKEN`
3. Auto-detected file: `~/.config/google-ads-open-cli/credentials.json`

For MCC (manager) accounts, also set `GOOGLE_ADS_LOGIN_CUSTOMER_ID`.
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The description lists generic phrases such as "Google Ads," "ad performance," and "campaign stats" as triggers, which are broad enough to match many ordinary conversations about advertising. The file does not provide exclusion conditions or negative examples to clarify when this skill should not activate.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The skill instructs use of a CLI that queries Google Ads accounts and relies on OAuth2 and developer tokens, which can expose sensitive account, billing, and performance data. While it notes the tool is read-only, it does not include a clear user-facing warning about handling credentials carefully or that account data will be transmitted to the Google Ads API.

Static analysis

No suspicious patterns detected.