Back to skill

Security audit

Dialogflow Cx Agents

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it can delete and export Dialogflow CX agents without enough warning, scoping, or confirmation.

Review this skill before installing if it may run against production Dialogflow CX projects. Use least-privilege Google credentials, restrict allowed projects and locations, avoid giving delete/export permissions unless needed, and require manual confirmation plus backups before deleting or exporting agents.

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
scripts/agents.py:17
Finding
Unpinned Python Dependencies Permit Unreviewed Package Versions<![CDATA[ ## Vulnerability Details **File Location**: `scripts/agents.py:17` and `scripts/agents.py:30` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```python Install: pip install google-cloud-dialogflow-cx google-auth ``` ```python except ImportError: print("Error: google-cloud-dialogflow-cx not installed") print("Run: pip install google-cloud-dialogflow-cx google-auth") sys.exit(1) ``` ### Technical Analysis The installation instructions request `google-cloud-dialogflow-cx` and `google-auth` without exact version constraints or integrity hashes. Consequently, package resolution selects whatever compatible releases are available from the configured package index at installation time rather than versions that were reviewed with this project. If an upstream release, transitive dependency, or configured package repository is compromised, users following these instructions could install attacker-controlled code. Python packages may execute code during installation and are imported when the script starts, creating both installation-time and runtime execution opportunities. ### Attack Path 1. An attacker compromises a named dependency, one of its transitive dependencies, or a package index used by the victim. 2. The attacker publishes or serves a malicious version that satisfies the unconstrained installation request. 3. A user follows the installation instruction printed or documented by the script: `pip install google-cloud-dialogflow-cx google-auth`. 4. The package manager resolves and installs the malicious or compromised release. 5. Attacker-controlled code executes during package installation or when `agents.py` imports the package. 6. The code runs with the privileges and environment access of the user invoking `pip` or the CLI. This path requires compromise or malicious control of a relevant package distribution channel; the audited repository itself does not contain an embe ...[truncated 479 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Define reviewed, exact dependency versions in a requirements or lock file, for example: ```text google-cloud-dialogflow-cx==REVIEWED_VERSION google-auth==REVIEWED_VERSION ``` 2. Generate and verify cryptographic hashes for all direct and transitive packages, and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Replace both unpinned installation instructions in `scripts/agents.py` with a command that installs from the locked dependency file. 4. Use a trusted, explicitly configured package index and prevent fallback to untrusted indexes. 5. Run dependency vulnerability and provenance checks during CI, and update locked versions through a reviewed process. 6. Install dependencies in an isolated virtual environment under a non-privileged account, and avoid exposing cloud credentials during installation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### Delete Agent
```
DELETE /v3beta1/{name=projects/*/locations/*/agents/*}
```

### Export Agent
Confidence
89% confidence
Finding
The documented DELETE endpoint enables irreversible deletion of Dialogflow CX agents, which is a high-risk destructive action if exposed through an agent skill without strong guardrails. In an AI-tooling context, parameter abuse or prompt-induced misuse could target arbitrary agent resource names and cause loss of production chatbot assets.

External Transmission

Medium
Category
Data Exfiltration
Content
### List Agents
```bash
curl -X GET \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents" \
  -H "Authorization: Bearer ${TOKEN}"
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This markdown file includes a direct agent deletion command but provides no caution that the operation is destructive and may permanently remove a Dialogflow CX agent and its configuration. For markdown files, destructive behaviors that could affect user data or system integrity should be accompanied by an explicit warning.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill metadata says it is for creating, listing, updating, and deleting agents, but the reference also documents export, restore, and validate operations. This expands the effective capability surface beyond the declared scope, which can enable unreviewed destructive or sensitive data-moving actions such as restoring arbitrary agent content or exporting agent configurations.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The delete command performs an irreversible destructive action immediately on user-supplied input with no confirmation, dry-run, or safety interlock. In an agentic or automated context, this increases the chance of accidental or misrouted deletion of production Dialogflow agents, especially when resource names are passed through from other tools or prompts.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest description limits the skill to managing Dialogflow CX agents through create, list, update, and delete operations. This file also implements `export_agent`, which retrieves full agent content and writes it to a local file or reports a GCS URI, a materially different capability not described in the manifest.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The CLI hard-codes `--language` to default to `en`, which imposes a specific language choice when the user does not explicitly select one. This is a natural-language policy concern because the tool forces a locale/language default rather than requiring user choice or clear opt-in.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The Create Agent example sets `defaultLanguageCode` to `en` as the default behavior, and the document does not indicate that users may choose another language or that the skill is intentionally English-only. This can violate language/locale policy guidance when a specific language is imposed without opt-in or justification.

Description-Behavior Mismatch

Low
Confidence
92% confidence
Finding
The manifest says the skill is for creating, listing, updating, and deleting chatbot agents. `validate_agent` adds a separate validation operation that is not mentioned in the declared description, creating a scope mismatch between stated and actual behavior.

Static analysis

No suspicious patterns detected.