Files
dead-man-switch-2.0/memory-bank/progress.md

2.8 KiB
Raw Permalink Blame History

Progress - Dead Man Switch 2.0

Fazlar

Faz 1: Proje Kurulumu & Auth

  • Next.js proje kurulumu (Next.js 15, current latest)
  • Tailwind + shadcn/ui setup
  • PostgreSQL + Prisma setup
  • NextAuth.js entegrasyonu
  • User tablosu ve auth akışı
  • Temel layout ve routing
  • Dark mode aktifleştirildi

Faz 2: Mesaj CRUD

  • Message, Recipient, Attachment şemaları
  • Mesaj oluşturma formu
  • Mesaj listeleme/detay sayfaları
  • Mesaj düzenleme/silme
  • IDOR güvenlik açığı düzeltildi

Faz 3: Dosya Yükleme (R2)

  • Cloudflare R2 entegrasyonu
  • Dosya upload/download API
  • Dosya listeleme UI

Faz 4: Client-side Encryption

  • Web Crypto API wrapper
  • Encrypt/decrypt utilities
  • Şifreli mesaj oluşturma akışı
  • Decrypt sayfası (alıcı için)
  • Şifreli mesaj düzenleme
  • Dosya adı şifreleme

Faz 5: Check-in & Cron

  • Check-in API endpoint
  • Interval unit (dakika/saat/gün/ay)
  • Deadline kontrolü
  • Status güncellemeleri

Faz 6: Email Gönderimi

  • Nodemailer setup
  • Email templates
  • Deadline triggered email
  • Check-in reminder emails

Faz 7: Admin Panel 🔲

  • Admin role ve guard
  • Kullanıcı yönetimi
  • Mesaj istatistikleri
  • System logs

Faz 8: Polish & Deploy 🔲

  • Error handling
  • Loading states
  • Responsive tasarım
  • Production deployment
  • Monitoring setup

Sonradan Yapılacaklar

  1. Static Salt in Key Derivation
  • Severity: Medium
  • Location: src/lib/crypto.ts (Lines 13-13)
  • Line Content:

1 salt: encoder.encode("dead-man-switch-salt"),

  • Description: The deriveKeyFromPassword function uses a hardcoded, static salt ("dead-man-switch-salt") for all users and messages. In the event of a database compromise, this allows an attacker to perform mass rainbow table or dictionary attacks to crack passwords for all users simultaneously. A unique salt per encryption operation is required to force attackers to crack each password individually.
  • Recommendation:
    1. Generate a random, cryptographically secure salt (e.g., 16 bytes) for each new message or file encryption operation.
    2. Store this salt alongside the ciphertext (e.g., as a prefix to the encrypted string or in a separate database column).
    3. Update deriveKeyFromPassword to accept salt as a parameter.
    4. Update the encrypt and decrypt flows to pass this unique salt during key derivation.

Tamamlanan

  • Teknoloji stack seçimi
  • Memory bank oluşturma
  • Faz planlaması
  • Faz 1: Auth sistemi
  • Faz 2: Mesaj CRUD
  • Faz 3: Dosya Yükleme (R2)
  • Faz 4: Client-side Encryption
  • Faz 5: Check-in & Cron
  • Faz 6: Email Gönderimi

Bilinen Sorunlar

(henüz yok)