FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
FOCUSCurrently working on ScheduleSomething and LayerdEvents algorithmsLearn More
ScalingArchitecture
Threat Model & Security Design
DocsscalingArchitectureThreat Model & Security Design
GitHub Live Sync

Threat Model & Security Design

Live technical documentation fetched from GitHub repository omghante/metapilot/docs/architecture/threat-model.md

Security Threat Model

This document outlines MetaPilot's formal threat model, detailing trust boundaries, attack vectors, potential threat scenarios, and implemented security controls.

1. Trust Boundaries & Attack Surfaces

Rendering diagram...

️ 2. Threat Scenarios & Mitigations Matrix

Threat CategoryPotential Risk / VectorImpact LevelImplemented Mitigation Control
Cross-Tenant Data LeakageTenant A attempts to read/modify Tenant B's contacts or messages via API manipulationCritical
TenantMiddleware
resolves tenant explicitly; QuerySets filter by
tenant_id
; API ViewSets validate tenant ownership.
Meta Access Token ExposureAttacker dumps database or logs and steals Meta WhatsApp access tokensCriticalCredentials stored using Fernet AES-256 encryption;
FERNET_KEY
stored exclusively in env vars; values masked in logs.
Spoofed Meta Webhook InjectAttacker sends fake incoming messages to
/api/webhooks/whatsapp/
HighMandatory
X-Hub-Signature-256
HMAC validation against tenant's App Secret before processing payload.
JWT Token HijackingAccess token intercepted or stolen from client memoryHighShort access token TTL (15 mins); HTTPS enforced; refresh token rotation & blacklist on logout (
token_blacklist
).
Broadcast Abuse / SpamCompromised user schedules millions of messages triggering Meta banHighToken Bucket Rate Limiting (default 50 msgs/sec per tenant); Super Admin quota enforcement.
Brute-Force AuthenticationAttacker attempts password spraying on
/api/auth/login/
MediumRate limiting middleware; strong password validator rules (min 8 chars, complexity checks).

3. Key Rotation & Emergency Response

  • Fernet Encryption Key Rotation: Executed via operational runbook rotate-fernet-keys.md.
  • Security Incident Escalation: Follow policies outlined in SECURITY.md.