read-execution-plan
Pass
Audited by Gen Agent Trust Hub on Nov 18, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- Database Configuration Adjustments: The skill provides instructions for enabling
LAST_QUERY_PLAN_STATSviaALTER DATABASE SCOPED CONFIGURATION. This represents a persistent change to the database's operational settings, which is a standard requirement for collecting actual execution plan statistics. - Access Control Requirements: Technical analysis of execution plans requires elevated database permissions, such as
VIEW DATABASE STATE,SHOWPLAN, or membership in roles like##MS_ServerStateReader##. The skill accurately documents these requirements for user awareness. - Indirect Prompt Injection Surface: The skill is designed to process XML-formatted execution plans, which can contain data from the database engine.
- Ingestion points: Data enters the agent's context from SQL Dynamic Management Views (DMVs) such as
sys.dm_exec_query_plan_statsas described inSKILL.md. - Boundary markers: The skill includes explicit instructions advising the agent not to paste the full XML document into the response or context, which helps manage the information flow.
- Capability inventory: The skill utilizes the agent's ability to execute SQL queries and process the resulting data.
- Sanitization: To minimize risks from processing large blocks of untrusted XML, the skill recommends using server-side XQuery (e.g.,
.value()and.nodes()methods) to extract only specific, structured fields like row counts and operator names before the data is handled by the agent.
Audit Metadata