Security Overview#
QueryMind is designed with security as a first-class priority. Your database credentials and sensitive data are protected using industry-standard encryption and platform-native security features.
Zero-Knowledge Architecture#
Your credentials never leave your machine. QueryMind uses a zero-knowledge architecture where all sensitive data is encrypted and stored locally on your device. Our cloud services never receive or store your database passwords.
Credential Storage#
Platform-Native Encryption#
QueryMind uses Electron's safeStorage API, which leverages your operating system's native secure storage:
| Platform | Storage Mechanism |
|---|---|
| macOS | Keychain Services |
| Windows | Data Protection API (DPAPI) |
| Linux | Secret Service API / libsecret |
This means your credentials are protected by the same security mechanisms that protect your system passwords and other sensitive data.
How It Works#
- When you save a database connection, the password is encrypted using your OS's native encryption
- The encrypted data is stored locally in a secure credential store
- Only your user account on your machine can decrypt the credentials
- Credentials are never transmitted to our servers
Data Encryption#
At Rest#
All sensitive data stored locally is encrypted:
- Database passwords - Encrypted via platform-native safeStorage API
- SSH key passphrases - Encrypted using the same mechanism
- OAuth refresh tokens - Encrypted and stored in the credential store
- API keys (BYOK) - Encrypted locally, never sent to our servers
In Transit#
All network communications use secure protocols:
- HTTPS/TLS 1.3 - All API communications are encrypted
- WSS - WebSocket connections for AI features use secure WebSockets
- SSH Tunneling - Database connections can be tunneled through SSH
Authentication#
OAuth 2.0#
QueryMind supports secure authentication via:
- Google OAuth - Sign in with your Google account
- GitHub OAuth - Sign in with your GitHub account
Access tokens are stored in memory only and are never persisted to disk. Refresh tokens are encrypted using the platform's secure storage.
Guest Mode#
You can try QueryMind without creating an account. In guest mode:
- All data stays on your local machine
- No account creation required
- Limited to local database connections
Query Safety#
Confirmation Levels#
QueryMind implements a tiered confirmation system to prevent accidental data loss:
| Query Type | Confirmation Required | Examples |
|---|---|---|
| SELECT | None | Read-only queries |
| DML (Data Modification) | Single confirmation | INSERT, UPDATE, DELETE |
| DDL (Schema Changes) | Double confirmation | DROP, TRUNCATE, ALTER |
SQL Injection Prevention#
- All user inputs are validated before use
- SQL identifiers (table names, column names) are validated against strict patterns
- Parameterized queries are used where applicable
Dangerous Query Detection#
QueryMind warns you before executing potentially dangerous queries:
DROP DATABASE/DROP SCHEMADROP TABLEwithoutIF EXISTSTRUNCATE TABLEDELETEwithoutWHEREclauseUPDATEwithoutWHEREclause
Connection Security#
Rate Limiting#
To protect against brute-force attacks:
- Maximum 10 connection attempts per host per minute
- 5-minute cooldown after exceeding the limit
- Rate limit is cleared after successful connection
SSH Tunneling#
For databases not directly accessible:
- Support for SSH key authentication
- SSH key passphrases are encrypted in the credential store
- Jump host / bastion server support
AI Feature Security#
Your Data Privacy#
When using AI features:
- Schema context is sent to generate accurate queries, but actual data values are not
- AI providers (OpenAI, Anthropic, Google) process queries according to their privacy policies
- You can use your own API keys (BYOK) for full control
Bring Your Own Key (BYOK)#
For maximum privacy, use your own API keys:
- Your API keys are encrypted and stored locally
- Queries go directly to the AI provider
- No query data passes through our servers
Best Practices#
For Personal Use#
- Use OAuth sign-in for the best experience
- Enable OS-level screen lock for physical security
- Regularly update QueryMind to get security patches
For Production Databases#
- Use SSH tunneling for remote databases
- Create read-only database users when possible
- Enable DDL confirmation (on by default)
- Consider using a bastion host for added security
For Teams#
- Use individual accounts instead of sharing credentials
- Leverage database-level access controls
- Review query history regularly
Reporting Security Issues#
If you discover a security vulnerability, please report it responsibly:
- Email: [email protected]
- Do not disclose the issue publicly until we've addressed it
- We appreciate and acknowledge security researchers
Related Topics#
- Getting Started - Install QueryMind
- Database Connections - Connect securely to databases