Back to skill

Security audit

Dialogflow Cx Advanced

Security checks for vulnerabilities and agentic risk

Overview

This skill provides disclosed Dialogflow CX management examples and a small read-only helper script, with credential and dependency hygiene caveats but no hidden or destructive behavior.

Before installing or using this skill, use a least-privilege Google Cloud identity, avoid pasting tokens or service-account JSON into shared transcripts, review any webhook destination because it can receive conversation/session data, and install Python dependencies in an isolated environment with pinned versions where possible.

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/advanced.py:10
Finding
Unpinned Third-Party Dependencies Create Supply-Chain Risk## Vulnerability Details **File Location**: `scripts/advanced.py:10-15` and `scripts/advanced.py:23-27` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium **Vulnerable code:** ```python Requires: - google-cloud-dialogflow-cx - google-auth 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 project instructs users to install `google-cloud-dialogflow-cx` and `google-auth` without exact version constraints or package integrity hashes. Consequently, `pip` resolves whichever package versions and transitive dependencies are available from the configured package index at installation time. The effective executable dependency set can therefore change after this skill has been reviewed. This does not establish that the named packages are currently malicious. However, if a future release, transitive dependency, configured package index, or dependency resolution path is compromised, installation or import of the resolved code could execute attacker-controlled Python under the privileges of the user running the skill. The absence of a lock file and hashes also prevents reliable verification that users install the same dependency artifacts that were security-reviewed and tested. ### Attack Path 1. An attacker compromises a future dependency release, one of its transitive dependencies, or a package index used by the victim. 2. A user runs the recommended command: `pip install google-cloud-dialogflow-cx google-auth`. 3. Because no versions or hashes are specified, `pip` resolves and installs the attacker-controlled or compromised artifact. 4. Malicious code can run during package installation or when `advanced.py` imports the installed p ...[truncated 686 chars]
Remediation
## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version rather than installing an unconstrained latest release. 2. Generate and commit a dependency lock file that captures all transitive dependency versions. 3. Record and enforce cryptographic hashes for downloaded artifacts, such as through a hash-locked `requirements.txt` installed with `pip --require-hashes`. 4. Replace the runtime error message with installation instructions that reference the reviewed lock file, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 5. Obtain packages only from a trusted, explicitly configured index and consider using an internally mirrored repository containing approved artifacts. 6. Automate dependency vulnerability scanning and controlled update review. Regenerate hashes and rerun security tests whenever dependencies are upgraded. 7. Run the CLI with least-privilege Google credentials and in an isolated virtual environment to reduce the scope of a dependency compromise.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding
The description overstates the skill's capabilities. The code only supports two read-only operations: listing environments and listing webhooks for a Dialogflow CX agent. It does not perform broader management actions, and it does not implement deployment management at all. While it does use the v3beta1 Dialogflow CX interface, it does so through the Python client library rather than directly via REST API. This is a material description-to-behavior mismatch.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill instructs users to obtain and use bearer tokens and service-account credentials but does not include safeguards for handling secrets, such as avoiding shell history leaks, restricting credential scope, or preventing accidental logging/sharing. In an agent context, this increases the risk that sensitive cloud credentials are exposed to other tools, transcripts, or operators and then used to access Dialogflow or broader Google Cloud resources.

External Transmission

Medium
Category
Data Exfiltration
Content
### List Environments
```bash
curl -X GET \
  "https://dialogflow.googleapis.com/v3beta1/projects/${PROJECT_ID}/locations/${LOCATION}/agents/${AGENT_ID}/environments" \
  -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
92% confidence
Finding
The reference includes inline webhook credentials and demonstrates sending session identifiers, parameters, and user text to an external endpoint without any warning about secret management, data minimization, or privacy handling. In an API reference for deployment and webhook configuration, readers may copy these patterns directly, leading to hard-coded secrets, unnecessary exposure of conversational data, and insecure downstream integrations.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The natural-language example fixes the request locale to "en" with no note that other language codes may be used or that English is only illustrative. This can be read as enforcing a specific language without user opt-in or documented justification.

Static analysis

No suspicious patterns detected.