Skip to content

Security: makr-code/ThemisDB

Security

SECURITY.md

πŸ” Security Policy

ThemisDB Security Team

Security Score Gitleaks Responsible Disclosure


πŸ“‹ Supported Versions

Important

ThemisDB is actively maintained. Security updates are provided for supported versions only.

Version Status Security Updates End of Life
1.x βœ… Active βœ… Yes TBD
0.9.x βœ… Maintenance βœ… Yes 2026-12-31
< 0.9 ❌ Unsupported ❌ No 2024-01-01

🚨 Reporting a Vulnerability

We take security vulnerabilities seriously. If you discover a security issue, please follow our responsible disclosure process.

❌ Do NOT

Caution

Never do these things:

  • ❌ Open a public GitHub issue for security vulnerabilities
  • ❌ Discuss the vulnerability publicly before it's addressed
  • ❌ Exploit the vulnerability beyond demonstration purposes

βœ… Do

1️⃣ Report via GitHub Security Advisories (Recommended)
  1. Go to Security Advisories
  2. Create a new private security advisory
  3. Include:
    • πŸ“ Description of the vulnerability
    • πŸ”„ Steps to reproduce the issue
    • πŸ’₯ Potential impact assessment
    • πŸ› οΈ Suggested fixes (optional)
2️⃣ Use Responsible Disclosure
  • ⏳ Give us reasonable time to address the issue
  • 🀐 No public disclosure before fix is released
  • 🀝 Coordinate disclosure timeline with security team
3️⃣ Provide Sufficient Detail

Help us reproduce and verify the issue:

  • πŸ–₯️ Environment details (OS, version, configuration)
  • πŸ“Š Proof-of-concept (PoC) code or steps
  • πŸ“Έ Screenshots or logs (if applicable)

Response Timeline

Timeframe Action Status
Within 24 hours Acknowledgment of your report πŸ“¨
Within 72 hours Initial assessment & severity classification πŸ”
7-14 days Detailed response with remediation plan πŸ“‹
30-90 days Fix released (depending on severity/complexity) πŸš€

Note

Critical vulnerabilities are prioritized and may receive expedited fixes within 7 days.


πŸ›‘οΈ Security Measures

ThemisDB implements defense-in-depth security across all layers:

πŸ”‘ Authentication & Authorization
  • βœ… RBAC (Role-Based Access Control) with 4-tier hierarchy
  • βœ… mTLS (Mutual TLS) for client authentication
  • βœ… Token-based API authentication
  • βœ… HashiCorp Vault integration for secrets management

Security Level: ⭐⭐⭐⭐⭐

🌐 Network Protocol Security (v1.3.0+)
Protocol Security Features TLS Version
HTTP/2 Server Push, TLS 1.3 required 1.3+
WebSocket WSS (WebSocket Secure) 1.2+
MQTT TLS/mTLS support, auth required 1.2+
PostgreSQL Wire SSL/TLS encryption, RBAC 1.2+
MCP Server Transport security (stdio/SSE/WS) 1.2+

[!IMPORTANT] All protocols require explicit opt-in build switches for production readiness.

πŸ”’ Encryption

Data-at-Rest:

  • πŸ” AES-256-GCM encryption
  • πŸ—„οΈ Field-Level Encryption (schema-based selective encryption)
  • πŸ”‘ Key Management: HSM (PKCS#11), Vault, or Mock providers

Data-in-Transit:

  • 🌐 TLS 1.3 (with TLS 1.2 fallback)
  • πŸ”— Perfect Forward Secrecy (PFS)
  • πŸ“œ Certificate pinning for HSM/TSA
βœ… Input Validation
  • πŸ“‹ JSON Schema validation
  • πŸ’‰ AQL injection prevention
  • 🚫 Path traversal protection
  • πŸ“¦ Request body size limits (10MB default)
🚦 Rate Limiting & DoS Protection
  • ⏱️ Token bucket algorithm (100 req/min default)
  • 🌍 Per-IP rate limiting
  • πŸ‘€ Per-user rate limiting
  • βš™οΈ Configurable thresholds
πŸ“Š Audit & Compliance

Audit Logging:

  • πŸ“ 65+ security event types
  • πŸ” Encrypt-then-Sign audit logs
  • πŸ”— Hash chain for tamper detection
  • πŸ”” SIEM integration (Syslog RFC 5424, Splunk HEC)

Compliance Ready:

  • βœ… GDPR/DSGVO
  • βœ… eIDAS
  • βœ… SOC 2
  • βœ… HIPAA

πŸ”’ Security Hardening

Important

For production deployments, follow our Security Hardening Guide.

Hardening Checklist

Step Action Priority
1️⃣ Enable TLS with strong cipher suites πŸ”΄ Critical
2️⃣ Configure RBAC with least-privilege principle πŸ”΄ Critical
3️⃣ Enable audit logging with encryption 🟑 High
4️⃣ Use external key management (Vault/HSM) 🟑 High
5️⃣ Configure rate limiting appropriately 🟒 Medium
6️⃣ Set up monitoring and alerting 🟒 Medium
7️⃣ Regular security updates and patching πŸ”΄ Critical

πŸ“š Security Documentation

Core Security Guides
Advanced Security Topics

🀝 Vulnerability Disclosure Policy

We follow responsible disclosure practices:

1️⃣ Acknowledgment

Security researchers who responsibly disclose vulnerabilities will be acknowledged in our security advisories (unless they prefer to remain anonymous).

2️⃣ No Legal Action

We will not take legal action against security researchers who:

  • βœ… Act in good faith
  • βœ… Follow this security policy
  • βœ… Do not access or modify other users' data
  • βœ… Do not disrupt our services
3️⃣ CVE Coordination

For significant vulnerabilities, we will coordinate CVE assignment with MITRE.


πŸ” Security Scanning

Automated security scanning is integrated into our CI/CD pipeline.

Tools

Tool Purpose Integration
Gitleaks Secret detection in source code βœ… CI/CD
clang-tidy Static analysis for C++ code βœ… CI/CD
cppcheck Additional C++ security checks βœ… CI/CD
Trivy Container image vulnerability scanning βœ… CI/CD
OWASP ZAP Dynamic application security testing 🚧 Planned

Run Scans Locally

Windows (PowerShell)
.\security-scan.ps1
Linux/WSL
# If the script exists
./security-scan.ps1

# Or use tools directly:
gitleaks detect --source . --verbose
cppcheck --enable=warning,style --inconclusive ./src ./include

πŸ“ž Security Contact

Method Purpose Link
πŸ”’ GitHub Security Advisories Report vulnerabilities (Recommended) Report
πŸ’¬ GitHub Issues Non-sensitive security discussions Issues
πŸ”‘ PGP Key Encrypted communications Available upon request

Note

Response Time: Within 24 hours for initial acknowledgment.


πŸ“… Changelog

Date Event
2025-11 πŸ“ Initial security policy publication

πŸ” Security is a top priority at ThemisDB

🚨 Report a Vulnerability Β· πŸ“– Security Docs Β· πŸ›‘οΈ Hardening Guide

There aren’t any published security advisories