T01 · Skill Instruction Hijacking
- Location
migrate.py:347- Finding
Untrusted Dialogflow CX Content Is Embedded into Authoritative CES Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
migrate.py:347Untrusted Dialogflow CX Content Is Embedded into Authoritative CES Instructions
migrate.py:175Source-Controlled Webhook URLs Become Callable CES Tools Without Destination Validation
SKILL.md:11Runtime Dependencies Are Not Reproducibly Pinned
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.
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.
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."""
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.
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."""
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.
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.
# Autoresearch Config for dialogflow-cx-to-ces-migration
## Target Skill
`skills/dialogflow-cx-to-ces-migration/SKILL.md`
## Test Inputs (5 scenarios)
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.
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.
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.
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.
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.
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.
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.