All Products
Database Guard
SQL injection prevention for AI agents
Database Guard validates and sanitizes all database queries generated
by AI agents. It prevents SQL injection, enforces parameterization, and ensures
agents can only access authorized data through allowlist-based table/column filtering.
python
from sentinelseed import DatabaseGuard
# Configure allowed tables and operations
guard = DatabaseGuard(
allowed_tables=["orders", "products"],
allowed_operations=["SELECT"],
max_rows=1000
)
# Validate AI-generated query
query = agent.generate_query("Show me orders from last week")
result = guard.validate(query)
if result.is_safe:
# Execute the sanitized query
db.execute(result.parameterized_query, result.params)
else:
print(f"Blocked: {result.violations}")Key Features
SQL injection detection and blocking
Automatic query parameterization
Table/column allowlisting
Query complexity limits
Read-only mode enforcement
Best For
Text-to-SQL agents
Data analysis assistants
Business intelligence bots
Customer service with DB access