query-hint-tuning

Pass

Audited by Gen Agent Trust Hub on Nov 18, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [Structured SQL Execution]: The skill constructs and executes T-SQL commands to analyze query performance. It mitigates risks by explicitly restricting operations to SELECT statements and providing logic to ensure session-level settings (like SHOWPLAN_XML) are active to prevent accidental data modification or execution.
  • [Two-Phase Execution Model]: The skill implements a mandatory 'Phase 1' which only generates estimated plans (read-only) and an optional 'Phase 2' for actual measurement. Phase 2 requires explicit user authorization before execution, serving as a significant guardrail against resource exhaustion or unintended workload execution.
  • [Indirect Prompt Injection Surface]: The skill processes external data in the form of SQL query results and XML execution plans. While this presents a theoretical surface for indirect prompt injection, the skill specifically instructs the agent to extract precise technical metrics (e.g., QueryPlanHash, CpuTime), which minimizes the risk of the agent interpreting malicious instructions embedded in database content.
  • [Tool Integration]: The skill integrates with established database administration utilities such as the SQL Tools MCP server and the sqlcmd utility. These tools are used within their intended administrative context for query tuning and performance diagnostics.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 18, 2026, 03:27 AM