Description
pkg/snowflake/client.go:83-87 and :124-127
Both query() and execute() functions log the full SQL query text as a structured log value:
logger := log.FromContext(ctx).WithValues(
"role", role,
"secondaryRole", "NONE",
"query", sqlQuery, // full query text logged
)
executeBatch() at line 162 does the same for each query in the batch.
Impact
All SQL queries including file paths, database names, stage names, and any data embedded in queries are visible in controller logs. If the SQL injection vulnerability (issue #169) is exploited the injected payloads also appear in logs.
Fix
Log a query type identifier instead of the full text:
logger := log.FromContext(ctx).WithValues(
"role", role,
"queryType", extractQueryType(sqlQuery), // e.g. "PUT", "SELECT", "REMOVE"
)
Description
pkg/snowflake/client.go:83-87and:124-127Both
query()andexecute()functions log the full SQL query text as a structured log value:executeBatch()at line 162 does the same for each query in the batch.Impact
All SQL queries including file paths, database names, stage names, and any data embedded in queries are visible in controller logs. If the SQL injection vulnerability (issue #169) is exploited the injected payloads also appear in logs.
Fix
Log a query type identifier instead of the full text: