Back to skill

Security audit

Dialogflow Cx Flows

Security checks for vulnerabilities and agentic risk

Overview

The skill is for Dialogflow CX management, but it exposes broad remote write and delete workflows without enough scoping or safety warnings, so users should review it carefully before use.

Install only if you intend to let an agent work with Dialogflow CX configuration. Use a test agent first, provide least-privileged Google credentials, treat POST/PATCH/DELETE/import/load operations as persistent production changes, and pin dependencies before running the Python helper in a shared or sensitive environment.

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/flows.py:14
Finding
Unpinned Third-Party Dependencies## Vulnerability Details **File Location**: `scripts/flows.py:14-15` **Vulnerability Type**: Unpinned and integrity-unverified Python dependencies **Risk Level**: Medium ### Vulnerable Code ```python Install: pip install google-cloud-dialogflow-cx google-auth ``` ### Technical Analysis The installation instruction retrieves the latest versions of `google-cloud-dialogflow-cx` and `google-auth` without exact version constraints, a dependency lockfile, package hashes, or an explicitly trusted package index. Consequently, dependency resolution is mutable and cannot reliably reproduce the set of packages reviewed during the audit. The package names are consistent with the skill's stated functionality and there is no evidence that they are currently malicious. Nevertheless, an attacker who compromises an upstream release, a transitive dependency, or the package index configured in the user's pip environment could cause malicious package code or installation hooks to execute. ### Attack Path 1. A user follows the installation command included in `scripts/flows.py`. 2. pip resolves the named packages and their transitive dependencies from the user's configured package index. 3. An attacker compromises a resolved release or controls the configured index and serves a malicious package version. 4. pip downloads and installs the unverified package. 5. Malicious build or installation logic executes during installation, or malicious runtime code executes when `flows.py` imports the package. This exploitation path requires compromise or attacker control of a dependency distribution channel or the user's pip configuration. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running pip or the script. Depending on that user's environment, this could expose local files, Google application-default credentials, service-account credentials referenced by `GOOGLE_APPLICATION_CREDENTIALS`, and accessible Dialogflow ...[truncated 299 chars]
Remediation
## Remediation Suggestions 1. Pin all direct dependencies to reviewed, exact versions, for example in a dedicated requirements file: ```text google-cloud-dialogflow-cx==REVIEWED_VERSION google-auth==REVIEWED_VERSION ``` 2. Generate and commit a lockfile that captures transitive dependency versions. 3. Use hash verification, such as a hash-locked requirements file installed with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Install packages only from an explicitly trusted index and prevent unintended fallback to untrusted indexes: ```bash python -m pip install --index-url https://pypi.org/simple --require-hashes -r requirements.txt ``` 5. Regularly scan pinned dependencies for known vulnerabilities and update them through a reviewed dependency-management process. 6. Perform installation in an isolated virtual environment and avoid running pip with administrator or root privileges.
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 (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description suggests broader management of Dialogflow CX flows and pages, including creating and organizing conversation paths. However, the code only supports four read-only operations: listing flows, getting a flow, listing pages, and getting a page. There are no create, update, delete, or organization/manipulation operations. Additionally, while the code targets the v3beta1 Dialogflow CX surface, it does so through the Python Google Cloud client SDK, not direct REST API calls as stated. The accessed resource domain is consistent with Dialogflow CX flows/pages, but the declared functionality is materially overstated.

Tool Parameter Abuse

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

### Train Flow
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

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

---
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

External Transmission

Medium
Category
Data Exfiltration
Content
### List Flows
```bash
curl -X GET \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/flows" \
  -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

Low
Confidence
91% confidence
Finding
The documentation provides a flow-creation example that performs a persistent remote write against Dialogflow CX without explicitly warning the user that it changes production-like agent configuration. This can lead to accidental modification of conversational flows, especially when operators assume examples are safe to run as read-only tests.

Missing User Warnings

Low
Confidence
91% confidence
Finding
The page-creation example writes a new page into an existing Dialogflow CX flow but does not warn that the action persists changes remotely. In an infrastructure/admin skill context, undocumented write behavior increases the risk of unintended configuration drift or disruption to conversation routing.

Static analysis

No suspicious patterns detected.