Back to dashboard

Security Policy & Operations Runbook

Kanak · June 2026

Supported Versions

Only the latest deployed version of Kanak receives security updates.

Reporting a Vulnerability

If you discover a security vulnerability, please report it privately by emailing the team directly (do not file public GitHub issues).

What to include:

Response timeline:

24 hours:Acknowledgment of receipt 7 days:Initial assessment and remediation plan 30 days:Fix deployed or rationale for extended timeline

Bug Bounty

We do not currently offer a bug bounty program.

Backup & Recovery

Automated Backups (Supabase)

Restore Procedure

  1. Go to Supabase Dashboard → Database → Backups
  2. Select backup → "Restore"
  3. Choose target: new project (recommended) or same project
  4. Wait for restoration (5-30 min depending on size)
  5. Verify: run SELECT count(*) FROM kanak.profiles; on restored DB
  6. Update SUPABASE_URL in Cloudflare secrets if restoring to new project

Manual Export (Free tier)

supabase db dump --linked --schema kanak > kanak_schema_$(date +%Y%m%d).sql
supabase db dump --linked --data-only --schema kanak > kanak_data_$(date +%Y%m%d).sql

RTO / RPO Targets

MetricTarget
RTO (Recovery Time)< 1 hour (Supabase PITR) | < 4 hours (manual restore)
RPO (Recovery Point)< 24 hours (daily backup) | < 1 hour (PITR)

Incident Response

1. Credential Leak

If API keys, service role key, or secrets are exposed:

  1. Rotate compromised key immediately in Supabase Dashboard / Cloudflare Dashboard
  2. Update wrangler.jsonc and Cloudflare secrets with new key
  3. Revoke old key
  4. Check audit logs for unauthorized access:
SELECT * FROM kanak.audit_logs
WHERE created_at > NOW() - INTERVAL '24 hours'
ORDER BY created_at DESC;
  1. Notify beta merchants if user data may have been exposed

2. Database Corruption / Data Loss

  1. Stop writes: Temporarily disable RPC functions or restrict access
  2. Restore from backup (see Backup section above)
  3. Verify integrity:
SELECT schemaname, tablename, n_live_tup
FROM pg_stat_user_tables
WHERE schemaname = 'kanak'
ORDER BY tablename;
  1. Notify users of service disruption

3. DDoS / Brute Force Attack

4. Payment / Billing Failure

Not applicable — no payment processing is currently integrated.

Security Checklist

HTTPS enforced — Cloudflare provides by default + HSTS header
Security headers — CSP, X-Frame-Options, X-Content-Type-Options in _headers
RLS policies — All tables have RLS enabled (user isolation)
Rate limiting — Login (10/60s), mutations (30/min), clear_data (1/24h)
Input validation — Server-side for proxied routes, CHECK constraints on DB
Rotate Supabase anon key — Do this before production launch
No hardcoded secrets in client source — Anon key served via /api/config
Structured logging — JSON format with request IDs in edge function
Error sanitization — Schema/table names stripped from error responses
Backup test — Verify backup restoration works (run quarterly)
Dependency audit — Run npm run audit before each deploy

Key Contacts & Escalation

RoleResponsible
Security LeadDevOps Lead
Database AdminBackend Dev
Incident ResponseOn-call rotation

For security issues, email the team directly — do not file public GitHub issues.