The technical controls, architecture decisions, and compliance posture that protect your data.
Dataviz by DemanualAI is an AI-powered analytics platform that translates natural language questions into SQL queries against your existing databases. Because our platform connects to your production data, security is foundational — not an afterthought.
This document describes the technical security controls, architectural decisions, and compliance posture that protect your data at every layer.
Core Security Principles:
[Your Database] â†â”€â”€ SSH Tunnel (AES-256) ──→ [DemanualAI Backend]
│
┌─────┴─────â”
│ FastAPI │
│ (Python) │
└─────┬─────┘
│
┌───────────────┼───────────────â”
│ │ │
[AWS Bedrock] [Supabase DB] [Redis Cache]
(LLM - ephemeral) (metadata) (temp cache)
│
[Your Browser / Slack / WhatsApp]Key architectural decisions:
All API traffic is routed through AWS CloudFront with enterprise-grade protection:
Strict-Transport-Security (HSTS, 1 year, includeSubDomains); X-Content-Type-Options: nosniff; X-Frame-Options: DENY; X-XSS-Protection: 1; mode=block; Referrer-Policy: strict-origin-when-cross-origin| Capability | Viewer | Editor | Admin |
|---|---|---|---|
| Ask questions (NL2SQL) | Yes | Yes | Yes |
| View query history | Own only | Own only | All |
| Manage connections | No | Yes | Yes |
| Generate reports | Configurable | Configurable | Yes |
| Manage team members | No | No | Yes |
| Configure tenant settings | No | No | Yes |
Your database credentials receive the highest level of protection:
service_role only — no client-side access possible"We store the recipe, not the ingredients."
Our platform processes untrusted natural language input through an LLM. We defend against prompt injection at multiple layers:
| Layer | Control | Description |
|---|---|---|
| Input Wrapping | <USER_QUERY> delimiters | User input wrapped in structured tags; LLM instructed to treat as untrusted |
| Injection Screening | Heuristic prefix scanner | Detects known injection patterns before LLM processing |
| Output Scanning | Leak detection (23+ patterns) | Scans LLM output for system prompt leakage or schema exposure |
| Safe Degradation | Automatic fallback | Detected leaks replaced with safe generic response |
Every AI-generated SQL query passes through three independent validation stages:
Stage 1 — Syntax (sqlglot AST parsing)
SELECT, WITH, UNION, INTERSECT, EXCEPT allowedINSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE, CREATE, GRANT, REVOKE, EXECStage 2 — Schema Validation
Stage 3 — EXPLAIN Dry-Run
EXPLAIN against your database| Layer | Mechanism | What Happens If Bypassed |
|---|---|---|
| LLM System Prompt | Instructs AI to generate SELECT only | Stage 1 catches it |
| SQL Validator (sqlglot) | AST-based rejection of non-SELECT | Stage 3 catches it |
| Database Connector | validate_read_only() keyword blocking | Query rejected at execution |
Even if all three layers were somehow bypassed, we recommend providing read-only database credentials.
Every database table has PostgreSQL Row-Level Security policies:
service_role onlyAll 15+ tables have RLS policies including:
tenants, tenant_members, connections, conversations, conversation_messagesfavorite_charts, audit_log, token_usage_log, tenant_limitsgenerated_reports, connection_few_shots, connection_error_ledgerTo maximize security when using Dataviz by DemanualAI:
| Framework | Status | Notes |
|---|---|---|
| GDPR | Compliant (core controls) | DPA available on request |
| DPDP Act 2023 (India) | Compliant (core controls) | Grievance officer designated |
| OWASP Top 10 | Addressed | WAF + application controls |
| SOC 2 Type II | Planned Q3 2026 | Controls in place, audit pending |
DemanualAI Pvt. Ltd.
Chennai, Tamil Nadu, India
This whitepaper is reviewed and updated quarterly. Last review: March 2026.