investigate-sql-cpu-pressure

Pass

Audited by Gen Agent Trust Hub on Nov 18, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • SQL Command Generation and Execution: The skill generates and executes T-SQL queries to collect diagnostic metrics from SQL Server and Azure SQL. It includes strong defensive programming by validating all user-supplied parameters against strict numeric ranges and types (e.g., TopN between 1-100), which mitigates SQL injection risks from the agent's inputs.
  • Indirect Prompt Injection Surface: The investigation involves reading SQL statement text and execution plan XML from database metadata views (DMVs). This data originates from the database workload, which represents a potential surface for indirect prompt injection if those queries contain malicious comments or instructions.
  • Ingestion points: Untrusted data enters the context via sys.dm_exec_sql_text and sys.query_store_query_text in Step 3, 4, and 7.
  • Boundary markers: The skill utilizes Markdown headers and code blocks in the references/report-template.md to structure and delimit data.
  • Capability inventory: The skill uses SQL execution tools (e.g., mssql_execute_query) for diagnostic retrieval.
  • Sanitization: User-supplied parameters are strictly sanitized; the skill also suggests truncating long SQL statements to maintain context integrity.
  • Principle of Least Privilege: The skill explicitly instructs users to connect with diagnostic logins limited to performance-state viewing permissions (e.g., VIEW SERVER PERFORMANCE STATE), rather than full administrative access. It warns against requesting broader permissions than necessary for the task.
  • Resource Integrity: All referenced diagnostic queries are stored locally within the skill's reference files, and no external code or scripts are downloaded or executed at runtime.
Audit Metadata
Risk Level
SAFE
Analyzed
Nov 18, 2026, 03:27 AM