skills/microsoft/microsoft-sql/query-store-volatile-historical-slow-queries-comparison/Gen Agent Trust Hub
query-store-volatile-historical-slow-queries-comparison
Pass
Audited by Gen Agent Trust Hub on Nov 18, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- Command Execution: This skill uses SQL diagnostic commands to retrieve performance metrics from Query Store. While it interacts directly with database engine metadata, all provided queries are read-only and intended for performance troubleshooting.
- Indirect Prompt Injection Surface: The skill processes output from system Dynamic Management Views (DMVs). This represents a standard ingestion surface where data from an external system (the database) enters the agent's context. The skill provides clear report templates to structure this data, reducing the risk of the agent misinterpreting the results.
- Dynamic SQL Generation: In the Query Store Health Check, the skill uses
sp_executesqlto dynamically adjust the query based on the SQL Server version. This is a common pattern for cross-version compatibility and does not incorporate untrusted user input into the execution string. - Least Privilege and Safety Guidance: The skill explicitly instructs the use of read-only diagnostic logins and emphasizes that state-changing commands (like clearing Query Store or forcing plans) are recommendations only and must never be executed without explicit user confirmation for each specific command.
Audit Metadata