snowflake-query-forensics

Pass

Audited by Gen Agent Trust Hub on Sep 9, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONDYNAMIC_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill ingests Snowflake query history, operator statistics, and platform insights which are externally controlled data sources. Ingestion points: The scripts/collect_snowflake_evidence.py script captures Snowflake CLI output, and scripts/analyze_query_evidence.py processes these as input JSON files. Boundary markers: The skill employs a 'Trusted Local Digest' mechanism (--trusted-input-sha256) to verify evidence provenance and strictly enforces contract versions. Capability inventory: The skill is capable of executing Snowflake CLI commands and writing forensic reports in JSON and Markdown formats. Sanitization: A comprehensive recursive redaction engine in scripts/analyze_query_evidence.py filters credentials, raw SQL, URLs, and emails from all output fields.
  • [COMMAND_EXECUTION]: The scripts/collect_snowflake_evidence.py script invokes the snow CLI via subprocess.run to execute diagnostic SQL. The command uses a list of arguments for safety, and the connection profile identifier is validated against a strict regex.
  • [DYNAMIC_EXECUTION]: The render_surface function in scripts/collect_snowflake_evidence.py performs string substitution to inject identifiers into reviewed SQL templates. While this creates a dynamic execution path, all substituted identifiers (database, user, role) are validated against unquoted Snowflake identifier patterns before injection.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 9, 2026, 03:49 AM
Security Audit — agent-trust-hub — snowflake-query-forensics