Body:
Currently Agent-Warden uses a blacklist approach — blocking known destructive SQL patterns (DROP, DELETE without WHERE, TRUNCATE, etc.).
A whitelist mode would let users define exactly which query shapes are allowed per tool. For example:
pythonallowed_patterns = {
"analytics_tool": ["SELECT"],
"write_tool": ["SELECT", "INSERT", "UPDATE"]
}
Any query not matching the allowed shapes gets rejected automatically.
Why this is better for production:
Simpler to maintain — define what's allowed vs catching every bad pattern
Safer failure mode — unknown queries get rejected instead of potentially slipping through
Easier to audit and explain to security teams
Inspired by community feedback on defense-in-depth strategies for agent SQL access.
Body:
Currently Agent-Warden uses a blacklist approach — blocking known destructive SQL patterns (DROP, DELETE without WHERE, TRUNCATE, etc.).
A whitelist mode would let users define exactly which query shapes are allowed per tool. For example:
pythonallowed_patterns = {
"analytics_tool": ["SELECT"],
"write_tool": ["SELECT", "INSERT", "UPDATE"]
}
Any query not matching the allowed shapes gets rejected automatically.
Why this is better for production:
Simpler to maintain — define what's allowed vs catching every bad pattern
Safer failure mode — unknown queries get rejected instead of potentially slipping through
Easier to audit and explain to security teams
Inspired by community feedback on defense-in-depth strategies for agent SQL access.