plan-analysis

Pass

Audited by Gen Agent Trust Hub on Nov 18, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONCOMMAND_EXECUTION
Full Analysis
  • XML Processing and XXE Mitigation: The skill processes user-supplied showplan XML files through a bundled Python script (scripts/plan_costs.py). This script includes a defensive check that rejects files containing DTD or entity declarations, which is an effective measure to mitigate XML External Entity (XXE) vulnerabilities.
  • Authorization for Resource-Intensive Operations: The instructions distinguish between obtaining estimated plans (compilation only) and actual plans (full query execution). It correctly mandates that the agent must require explicit user authorization before running queries that could impact server performance or consume significant resources.
  • Controlled Command Execution: The skill utilizes a local Python script and SQL command-line tools to perform its analysis. The logic is scoped to the specific task of plan ranking and bottleneck identification, using defined mathematical formulas rather than arbitrary code execution.
  • Dynamic SQL Construction: In SKILL.md, a T-SQL template is provided for analyzing plans within SQL Server. The skill includes instructions to properly escape single quotes when substituting the plan XML into the query, which helps ensure the integrity of the generated SQL statement.
  • Indirect Prompt Injection Surface: As the skill processes external XML content provided by users, it inherently possesses an ingestion surface for indirect prompt injection. However, the use of a specialized Python script with no eval() or exec() calls, combined with structured XML parsing, minimizes the potential impact of instructions embedded within the data.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 18, 2026, 03:27 AM