Skip to content

Security: omghante/metapilot

Security

SECURITY.md

Security Policy

MetaPilot handles sensitive WhatsApp API access tokens, JWT tokens, tenant data, and encrypted secrets. We take security seriously and appreciate responsible disclosure.

Reporting a Vulnerability

If you discover a security vulnerability within MetaPilot, please do NOT open a public issue. Instead, report it privately via email:

  • Security Email: security@metapilot.in
  • Response Time: We aim to acknowledge reports within 24 hours and provide a patch timeline within 72 hours.

Please include:

  • Description of the vulnerability and potential impact.
  • Step-by-step instructions or proof-of-concept to reproduce.
  • Any suggested mitigations or fixes.

Security Architecture & Best Practices

MetaPilot enforces security-in-depth across all system layers:

1. Data Encryption at Rest & Secret Management

  • Tenant Secrets: Access tokens, Meta App secrets, and API credentials are encrypted at rest using Fernet (AES-256 in CBC mode with HMAC authentication) via cryptography.
  • Key Storage: The FERNET_KEY is injected exclusively via environment variables and is never stored in code, logs, or databases.

2. Authentication & Role-Based Access Control (RBAC)

  • JWT Authentication: User sessions are authenticated using Short-lived JWT Access Tokens and Long-lived Refresh Tokens (rest_framework_simplejwt).
  • Role Hierarchy: Strict role scoping (SUPER_ADMIN, AGENCY_ADMIN, TENANT_ADMIN, TENANT_USER).
  • Tenant Isolation: Every database query is scoped by TenantMiddleware using strict header/URL-based tenant isolation.

3. Webhook Security

  • HMAC Verification: All incoming Meta Graph API webhooks require SHA-256 HMAC signature verification (X-Hub-Signature-256) against the tenant's app secret.
  • Replay Protection: Webhook payloads are timestamp-validated.

4. Code & Dependency Scanning

  • Automatic static code analysis and dependency vulnerability scans are run on every pull request.
  • Python packages are locked and audited; Node/Next.js dependencies are checked against known CVEs.

There aren't any published security advisories