Back to skill

Security audit

Dialogflow CX to CES Migration

Security checks for vulnerabilities and agentic risk

Overview

This migration skill is purpose-aligned and user-directed, but users should carefully review generated CES instructions and webhook tools before importing them into production.

Install only in an isolated environment with the minimum GCP permissions needed to read the source Dialogflow CX agent. Before importing generated CES files, review every generated instruction for prompt-injection text, confirm every webhook endpoint and authentication setting, and pin dependencies if this will be used in a production migration workflow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
migrate.py:347
Finding

Untrusted Dialogflow CX Content Is Embedded into Authoritative CES Instructions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
migrate.py:175
Finding

Source-Controlled Webhook URLs Become Callable CES Tools Without Destination Validation

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:11
Finding

Runtime Dependencies Are Not Reproducibly Pinned

Content
View full analysis
=1.28.0", "google-auth"] ``` ```bash pip install google-cloud-dialogflow-cx google-auth ``` ### Technical Analysis The dependency declaration accepts any version of `google-cloud-dialogflow-cx` at or above 1.28.0 and places no version constraint on `google-auth`. The documented installation command also installs whatever versions the package index currently resolves. The named packages appear consistent with official Google packages; the audit found no evidence of typosquatting or an intentionally malicious dependency. Nevertheless, mutable dependency resolution prevents reproducible installation and means future releases can be consumed without review. Python packages may execute code during installation or import. Therefore, compromise of a package release, package index, or dependency chain could affect the migration environment. ### Attack Path 1. An operator follows the documented installation process or the Skill runtime installs the declared dependencies. 2. The package index resolves versions that were not reviewed with this project. 3. A compromised, malicious, or incompatible package or transitive dependency is downloaded. 4. Package code executes during installation or when `migrate.py` imports the dependency. 5. The package obtains the privileges of the user running the migration and may access resources available to that process, including Application Default Credentials. ### Impact Assessment A compromised dependency would run with the migration process's local user privileges. Because the tool loads Google Application Default Credentials and communicates with Dialogflow CX APIs, malicious dependency code could potentially access those creden ...[truncated 231 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared behavior says the skill performs a full migration with retry logic and dry-run support, but the observed behavior only validates local output files and reports status. This mismatch is dangerous because users may trust it with production migration workflows, assume artifacts were generated correctly, and make operational decisions based on incomplete or nonexistent migration actions.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
89% confidence
Finding

This tool directly copies Dialogflow intent training phrases into generated CES root instructions as routing hints. If the source agent contains unsafe, adversarial, or sensitive prompt-like content, that content is promoted into system-level instructions for the migrated agent, creating a prompt injection and instruction poisoning risk in a production migration context.

Content

Scanner excerpt · migrate.py (reported line 349)May include surrounding context.

python
samples = [tp.parts[0].text for tp in intent.training_phrases[:2] if tp.parts]
                instructions.append(f"- '{intent.display_name}': triggered by phrases like {samples}")

        return instructions

    def _pages_to_instructions(self, flow_name: str, pages: list[CESPage]) -> list[str]:
        """Convert CX pages to natural language instructions for a CES sub-agent."""

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
91% confidence
Finding

The migration logic converts page content, prompts, fulfillment messages, and route text from the source agent into natural-language instructions for CES sub-agents. Because all source content is treated as trusted instruction text, a malicious or compromised Dialogflow CX agent could inject hidden directives, override behavior, or exfiltration-oriented instructions into the migrated agent's control plane.

Content

Scanner excerpt · migrate.py (reported line 384)May include surrounding context.

python
instructions.append("")

        return instructions

    def _convert_test_cases(self, test_cases, intent_map: dict) -> list[dict]:
        """Convert Dialogflow CX test cases to CES golden eval format."""

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises capabilities that imply reading and writing files, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization boundary gap where a caller or runtime may grant broader filesystem access than intended, increasing the chance of unintended data exposure or file modification during execution.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · autoresearch.md (reported line 4)May include surrounding context.

md
# Autoresearch Config for dialogflow-cx-to-ces-migration

## Target Skill
`skills/dialogflow-cx-to-ces-migration/SKILL.md`

## Test Inputs (5 scenarios)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generated instruction string says the agent 'communicate[s] in {agent.default_language_code}', which hard-codes a language choice into the migrated agent behavior. This is a natural-language locale policy issue because it does not offer the user any language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The exported CES agent definition sets "defaultLanguageCode" to "en" regardless of the source agent's actual language. This forces a specific language/locale in generated configuration and can violate language-choice policy when the source agent is not English or when no user opt-in exists.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The global rejection phrase 'No' is also overly generic and may be matched during unrelated conversation turns, causing premature cancellation, session termination, or navigation to the wrong flow. Because this agent uses 'NO' to end flows and reset behavior, an accidental or adversarially induced match could disrupt user actions such as bookings or support requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The global rejection phrase 'No' is also overly generic and may be matched during unrelated conversation turns, causing premature cancellation, session termination, or navigation to the wrong flow. Because this agent uses 'NO' to end flows and reset behavior, an accidental or adversarially induced match could disrupt user actions such as bookings or support requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language instruction explicitly states 'You communicate in en,' which imposes a single language choice on all interactions. There is no indication that users may choose another language or opt into this locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file defines a six-digit "pin_code" entity, which is a locale-specific term and format commonly associated with India, and the surrounding entities also reference India-specific vehicle models and registration formats. In a globally scoped skill artifact, this can amount to an implicit locale constraint without user choice or an explicit statement that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language input "ANDROID" appears to encode a platform/locale-style constraint as a fixed utterance, but the file provides no indication that users are offered a language or locale choice or that this constraint is justified. Under the policy rule, fixed natural-language constraints should be documented or optional when they could steer behavior without opt-in.

Content

No source excerpt is available for this finding.