Skip to content

Security Documentation

Incident Response Playbooks

Documented response procedures for common security and compliance incidents. All playbooks follow a Detect → Contain → Notify → Review cycle. Last reviewed: 2026-04-18.

Account Takeover Playbook (SEC-079)

Triggered by: suspicious login from new device, password reset not initiated by user, or user report.

Detect

  • New device login alert email sent to user (automated)
  • User reports unauthorized access via in-app feedback
  • Anomalous activity in audit trail (bulk export, setting changes)

Contain

  • Immediately revoke all active sessions for the account via Supabase auth admin
  • Disable account if compromise confirmed
  • Preserve audit trail — do NOT delete suspicious activity logs
  • If API key leaked: rotate key immediately in Cloudflare/Supabase dashboard

Notify User

  • Email user: "We detected suspicious activity on your account and have logged out all sessions for your security."
  • Instruct user to reset password via /forgot-password
  • Inform user of actions taken and data that may have been accessed
  • Provide timeline of events from audit log

Review

  • Analyze how access was gained (phishing, credential stuffing, session hijack)
  • Check if other accounts from same IP/device are affected
  • Update threat model if new attack vector identified
  • Log in post-incident review template below

Vendor Compromise Playbook (SEC-080)

Triggered by: vendor security notice, public breach disclosure, or anomalous behavior from a vendor API.

Supabase breach

  1. 1.Review Supabase breach disclosure for scope (database access? storage? auth?)
  2. 2.Immediately rotate: service role key, JWT secret, database password
  3. 3.Redeploy all Cloudflare Workers with new secrets
  4. 4.Audit recent database access logs for unauthorized queries
  5. 5.If customer data confirmed exposed: trigger 72h GDPR notification process
  6. 6.Monitor for credential stuffing attacks against customer accounts
  7. 7.Post-incident: evaluate migration to Supabase self-hosted or alternative

Cloudflare breach

  1. 1.Review Cloudflare incident report for scope (DDoS protection? DNS? WAF? Pages?)
  2. 2.If Cloudflare Pages compromised: audit all deployment logs
  3. 3.Rotate: Cloudflare API token, DNS records verified intact
  4. 4.Verify our workers were not modified (check deployment hashes in git)
  5. 5.If customer traffic intercepted: trigger breach notification process
  6. 6.Enable Cloudflare Audit Log monitoring alerts

LemonSqueezy breach

  1. 1.Review LemonSqueezy disclosure for scope (billing data, license keys, webhooks?)
  2. 2.Rotate webhook signing secret in LemonSqueezy + update LEMONSQUEEZY_WEBHOOK_SECRET env var
  3. 3.Revoke and re-issue any API keys
  4. 4.Notify customers if payment data (last 4 digits, billing address) was exposed
  5. 5.Suspend new subscriptions until breach scope confirmed
  6. 6.LemonSqueezy is MOR — they carry primary PCI DSS liability; confirm their obligations

Resend (email) breach

  1. 1.Rotate RESEND_API_KEY immediately
  2. 2.Review sent email logs for unauthorized sends
  3. 3.If email sending keys leaked: check for phishing abuse
  4. 4.Notify customers if email content was accessed
  5. 5.Temporarily disable non-critical transactional emails while investigating

Legal Hold Procedure (SEC-081)

Triggered by: litigation notice, regulatory investigation, or law enforcement request.

  1. 1.Immediately suspend any scheduled data deletion jobs for the affected user(s) or time period
  2. 2.Export a full data snapshot: org records, audit trail, documents, assessment history, API logs
  3. 3.Store snapshot in encrypted archive with SHA-256 hash for chain of custody
  4. 4.Do NOT modify, delete, or move any data under legal hold
  5. 5.Notify owner and seek legal counsel before responding to any external party
  6. 6.Log hold in writing with: date, nature of request, data scope, requesting party
  7. 7.Maintain hold until formal release notice received from counsel

Breach Notification Templates (SEC-082–084)

Regulatory Notification Timelines

JurisdictionDeadlineAuthorityThreshold
GDPR (EU/UK)72 hours from awarenessLead DPA in primary EU countryRisk to natural persons
CCPA (California)30 days to notify consumersCA AG if 500+ residents affectedPersonal info of CA residents
HIPAA (US healthcare)60 daysHHS + affected individualsPHI of US patients
UAE PDPL72 hours to authority, 72h to individualsUAE DIFC Commissioner / UAE DPASerious harm likely
Australia Privacy ActASAP (no hard deadline)OAICSerious harm likely

Customer Communication Template (SEC-083)

Subject: Important Security Notice — Action Required

Dear [Customer Name],

We are writing to inform you of a security incident that may have affected your Aegis Firma account.

WHAT HAPPENED
On [DATE], we identified [BRIEF DESCRIPTION — e.g., "unauthorized access to our database"].
We became aware of this incident on [DETECTION DATE].

WHAT INFORMATION WAS INVOLVED
The following types of information may have been affected: [LIST SPECIFIC DATA TYPES].
Your [payment / password data] was NOT affected — [reason, e.g., we do not store card numbers].

WHAT WE ARE DOING
• We have [immediate containment actions taken]
• We have [remediation steps: rotated keys, patched vulnerability, etc.]
• We are working with [Supabase / relevant vendors] to [prevent recurrence]

WHAT YOU SHOULD DO
1. [Specific action: reset your password / review your account activity / etc.]
2. Be alert for phishing emails referencing this incident
3. If you notice suspicious activity, contact us via the in-app Feedback page

HOW TO CONTACT US
If you have questions, sign in to Aegis Firma and use the Feedback page.

We sincerely apologize for any concern this may cause.

— The Aegis Firma Team

Regulator Communication Template (SEC-084)

To: [Data Protection Authority / Supervisory Authority name and email]
Subject: Personal Data Breach Notification — Aegis Firma / Aegis Digital Systems

1. IDENTITY OF CONTROLLER
   Name: Aegis Digital Systems
   Contact: [contact@aegisfirma.com or via in-app support]

2. NATURE OF THE BREACH
   Type: [Confidentiality / Integrity / Availability breach]
   Date/time of incident: [DATE TIME UTC]
   Date/time detected: [DATE TIME UTC]

3. CATEGORIES AND APPROXIMATE NUMBER OF DATA SUBJECTS AFFECTED
   [e.g., Business email addresses and hashed passwords of approximately X users]

4. LIKELY CONSEQUENCES
   [e.g., Risk of credential stuffing; no financial data involved]

5. MEASURES TAKEN OR PROPOSED
   Taken: [List immediate containment steps]
   Proposed: [List ongoing remediation]

6. CONTACT DETAILS FOR FURTHER INFORMATION
   Owner contact: [secure channel — owner personal email for regulator use only]

We commit to providing updates as the investigation progresses.

Post-Incident Review Template (SEC-085)

Complete within 72 hours of incident closure. Stored in internal incident log.

POST-INCIDENT REVIEW
===================
Incident ID: [INC-YYYY-NNN]
Severity: [Critical / High / Medium / Low]
Date of incident: [DATE]
Date closed: [DATE]
Reviewed by: [Name]
Review date: [DATE — within 72h of closure]

1. EXECUTIVE SUMMARY
   One paragraph: what happened, impact, resolution.

2. TIMELINE
   [DATE TIME] — Event 1 (e.g., first indicator of compromise)
   [DATE TIME] — Event 2 (e.g., confirmed breach)
   [DATE TIME] — Containment started
   [DATE TIME] — Service restored / data secured
   [DATE TIME] — Notifications sent (customers, regulators)
   [DATE TIME] — Incident closed

3. ROOT CAUSE ANALYSIS (5 WHYs)
   Why 1: [e.g., Unauthorized access occurred because...]
   Why 2: [because...]
   Why 3: [because...]
   Why 4: [because...]
   Why 5: [Root cause]

4. IMPACT ASSESSMENT
   Users affected: [N]
   Data categories exposed: [list]
   Financial impact: [estimate or "none identified"]
   Regulatory impact: [which notifications required?]

5. WHAT WORKED WELL
   - [e.g., Detection alert fired within 5 minutes]
   - [e.g., Runbook steps were clear and followed]

6. WHAT DID NOT WORK WELL
   - [e.g., No on-call rotation — owner was asleep]
   - [e.g., Logs did not have enough detail]

7. CORRECTIVE ACTIONS
   Action 1: [Description] | Owner: [Owner] | Due: [DATE]
   Action 2: [Description] | Owner: [Owner] | Due: [DATE]

8. RECURRENCE PREVENTION
   What specific change prevents this exact incident class from recurring?

9. SIGN-OFF
   Reviewed by: [Name, Date]