Skip to content

codewarrior96/siberlab-dev

Repository files navigation

siberlab.dev — Cybersecurity Portfolio + Eğitim Platformu

Capstone projesi. Endüstri-grade audit disiplini ile geliştirilen Next.js 15 + React 19 + Supabase Postgres tabanlı siber güvenlik portföyü ve eğitim platformu. Üretim ortamı: siberlab.dev · 826 küçük, izlenebilir commit (her biri kök-neden + audit-ID + test kanıtı taşır — "tek dev commit" yerine adım adım doğrulanabilir mühendislik) · 1144 vitest · Next.js 15 + React 19 + NextAuth v5 (npm audit 0) · çok-turlu audit chain (dahili Round 7/8/9 + harici panel-of-judges) · FREEZE-READY (audit-clean)

status tests e2e lint audit postgres


Özet

siberlab.dev, siber güvenlik öğrenme yolculuğunu destekleyen bir portföy + eğitim platformudur. Next.js 15 (App Router, React 19) ile geliştirilmiş; gerçek production deploy üzerinde çalışır (Vercel + Supabase Postgres + Resend). Kullanıcılar gerçek hesap açıp, ücretsiz eğitim laboratuvarlarında Linux komutlarını öğrenir, çok seviyeli CTF puzzle'ları çözer ve operatör profillerini yönetir.

Bu proje aynı zamanda endüstri-grade audit disiplini demonstrasyonudur. 5-fazlı baseline denetim + 13 review-pass chain (5 Gemini + 7 GPT external + Round-7 internal dedektif sweep + 2 hunts) ile 80+ risk maddesi sistematik olarak analiz edilmiş, kapatılmış veya şeffaf şekilde dokümante edilmiştir. Production-exploitable Critical/High açığı sıfır. Tüm scope kararları, defense-in-depth pattern'ları ve mentor-error correction lineage'ı izlenebilir audit-trail olarak korunmaktadır.

Hedef kitle: junior security analistleri, siber güvenlik öğrencileri, eğitmenler ve audit-grade engineering practice'i inceleme yapmak isteyen AI/insan reviewer'lar.

Şu anki durum (2026-06-14): LIVE — audit-clean (CV redesign + dedektif denetim kampanyası tamamlandı)

  • Postgres data plane: 5/5 kullanıcı-yüzlü domain (identity, profile, content, operations, telemetry) Supabase Postgres üzerinde, prod-verified. CV redesign ile portfolio_profiles (full_name/contact_email/phone/languages) + portfolio_certifications.no_expiry + portfolio_{experience,projects} tabloları eklendi (RLS deny-all).
  • CV üreteci yeniden tasarlandı (Faz 1-6): gerçek kimlik+iletişim, Awesome-CV→iki-kolon sidebar PDF (Source Sans 3 gövde), tarih disiplini, deneyim+projeler, diller (görsel seviye çubukları), tamlık ölçer. Sertifika belgeleri pdf.js canvas ile inline.
  • Test gate: 120 dosya / 1144 vitest yeşil; CI + E2E yeşil; coverage floor 44/36/39/46
  • Stack: Next.js 15.5.19 · React 19.2.7 · NextAuth 5.0.0-beta.31 · npm audit 0 vulnerability
  • Audit posture: Round 7/8/9 (dahili) + 3 harici pre-freeze agent + 2 harici panel-of-judges turu (ChatGPT + Gemini) + iç yakınsama turu (4 paralel agent) tamamlandı. Production-exploitable Critical/High/Medium = 0; açık Low = 0. Harici High trendi 2 → 1 → 0 (yakınsadı).
  • Performans doktrini: Google CWV + Amazon latency + LQIP + NVIDIA amortize ilkeleri kural olarak benimsendi; avatar LQIP placeholder ("asla boş kutu") canlı.
  • Manual verification: tüm akışlar canlı siberlab.dev hesabıyla doğrulandı (login, register, password reset, account delete, portfolio CRUD, dashboard telemetry, CTF L1-L7, logout)

Üretim Linki

🌐 siberlab.dev — canlı demo

Üretim ortamında deneyebileceğiniz akışlar:

  • /welcome — Premium pazarlama landing + login modalı (kök / buraya yönlenir; oturumlu kullanıcı /home'a). Particle-based "merhaba → siberlab.dev → logo" intro animasyonu + tone-eşli per-letter formation glow + reduce-motion uyumlu fallback
  • /register — Gerçek email doğrulama akışı (Resend integration, 32-byte entropy token, rate-limit 10/5dk)
  • /login — Credentials + GitHub/Google OAuth; brute-force throttle 10/5dk; emailVerified gate
  • /academy — Lab Engine üzerinde xterm.js terminal ile çok seviyeli CTF (L1-L7: cd/ls/cat/chmod/grep/nmap CVE hunting). Eski /community URL'i buraya 308 redirect
  • /portfolio — Profil + sosyal bağlantılar (GitHub / LinkedIn / TryHackMe / HackTheBox / X / Kişisel Site) + sertifika + eğitim kayıtları (Postgres content.* tabloları, per-user quota DB trigger)
  • /zafiyet-taramasi — CVE Radar (NIST NVD live feed, 8s timeout) + 8 MDX güvenlik yazısı
  • /home — Sentinel Dashboard (3D global threat map, server-authoritative telemetry akışı, kritik alert FX)
  • Logout outro — Tek IntroOverlay component'i mode='exit' ile çağrılır: "görüşmek üzere → siberlab.dev → logo" particle outro, navigate-first pattern ile dashboard flash sıfır

Neler Yapıldı (Faz 1–5 + Phase 9 audit chain)

Baseline 5-fazlı denetim (Faz 1-5)

Faz Kapsam Çıktı
1 Güvenlik & kimlik Auth, session, CSRF, rate-limit, identity-validation, scrypt N=32768 hardening, x-forwarded-for spoofing korunması
2 Lab Engine Eğitsel Linux shell simulation (cd / ls / cat / grep / chmod + pipelines + temel quoting)
3 API & contracts 28 API route, IDOR kapatma, RLS planlama, external integrations (CVE / GreyNoise / RSS aggregator)
4 UI & erişilebilirlik axe-core integration, useFocusTrap (5 modal), aria-label discipline, SectionErrorBoundary composition
5 End-to-end Playwright suite (Chromium), production siberlab.dev baseline, 3 user journey, GitHub Actions workflow

Her faz kendi audit raporunu üretti (Section 2 risk register + Section 9 mentor kararları). Phase 1.5 sonrası 15 hardening sub-cycle çalıştırıldı. Faz 2-5 her biri A → B → C → D pattern'i (audit → infra → mocks → test cases) ile stop-checkpoint disiplinine uydu.

Postgres migration (Phases 1-5 of migration, COMPLETE)

5 kullanıcı-yüzlü domain Supabase Postgres'e migrate edildi: identity (Phase 1), portfolio profile (Phase 2), certifications + education (Phase 3), reports (Phase 4), live telemetry (Phase 5). Hibrit yapı: PG source-of-truth, Storage shadow legacy cleanup için tutuluyor. Phase 7 cleanup tamamlandı (public.attack_events legacy table dropped). Phase 8 hardening (RLS posture, pg_cron retention, FK covering indexes, portfolio quota trigger) agent-side complete.

Phase 9 QA chain (13 review-pass)

5 Gemini + 7 GPT external scan + Round-7 internal dedektif sweep + 2 internal hunts. Her pass production-exploitable Critical/High bulduğunda fix + commit + push, sonra bir sonraki pass'a geç. Round 7 (2026-05-31): 4 paralel agent (Auth/Sec, Data plane, UI+a11y, API+integrations) → 20 finding → 18 fixed + 2 documented-deferred. Bilinen açık Critical/High/Medium: SIFIR.

05-31 sonrası (→ FREEZE-READY 2026-06-07): Round 8 (6 paralel, 4 High + 14 Med + 3 Low) + Round 9 (mikro-batch) + 3 harici pre-freeze agent + bağımsız re-audit + 2. harici panel-of-judges turu (ChatGPT + Gemini, 6 bulgu) + iç yakınsama turu (4 paralel agent: 0 Crit/High/Med, 5 Low kapatıldı) + 3. harici tur (ChatGPT: 0 Crit/High; SL-AUD-001 reset-oracle kapatıldı, SL-AUD-002 CTF self-cheat by-design kabul). Harici High trendi turlar arası 2 → 1 → 0. Detaylı kronoloji: CLAUDE.md.

Detaylı QA chain + Round 7 dispositions + 5 durable lessons: bkz. docs/POST_CAPSTONE_BACKLOG.md ve commit history git log --grep='Round\|9I\|Phase 9'.

Detaylı faz raporları: docs/AUDIT_README.md + docs/audit/INDEX.md


Bilinçli Kapsam Kararları

Bu proje transparent scope tightening disiplini ile geliştirilmiştir. Her kapsam-dışı bırakılan madde inline rationale ile dokümantedir — sessizce göz ardı yerine açıkça "DOC-ACCEPT", "PARTIAL", "DEFERRED" veya "RECLASSIFIED" işaretlenmiştir.

  • Aesthetic tradeoff (R-UI-03): Siberhacker neon-on-dark teması (#000000 + #00ff88 + #00d4ff), WCAG AA contrast standardı yerine intentional brand identity olarak korunmuştur. AAA-leaning state-critical accent variant'ları Phase 6'ya ertelendi.
  • Educational shell (R-LAB-08): Lab Engine POSIX-compliant DEĞİL; eğitsel-fidelity scope (cd / ls / cat / grep / chmod + pipelines). Escape sequences, glob, $(), > redirect, backtick substitution bilinçli olarak yoktur — Linux fundamentals öğretimi için yeterli kapsamdadır.
  • Demo-grade flag validation (R-LAB-01): Lab puzzles client-side flag check kullanır (portfolio-demo bağlam, graded competition değil). Server-side refactor Phase 6'ya ertelendi.
  • Platform-backbone deploy (R-API-03, CLOSED 2026-05-29): supabase/platform-backbone-v1.sql ve 4 schema (identity / platform / content / operations / learning) Phase 1+ migration cycle'ı sırasında production Supabase'e deploy edildi. RLS-no-policy model live (service_role bypass + zero anon/authenticated grants). Round-7 H1 closure (2026-05-31): password_changed_at ALTER source-controlled SQL'e eklendi, restore drill viable.
  • E2E coverage scope (Yol A Z.13): Faz 5 verified-user setup üç path'i (Resend sandbox / pre-verified user / SERVICE_ROLE_KEY) red ettiği için 3 user journey PARTIAL closed + 9 sub-spec test.skip() ile dokümante edildi. Tüm skip'ler inline Phase 6 deferral nedeni taşır.
  • 6 R-XX OPEN (Faz 1): R-05 (TOCTOU), R-09 (reserved username breadth), R-10 (displayName homoglyph), R-11 (token-validity oracle rate-limit), R-17 (audit log silent fail), R-18 (email-keyed reset budget) — Low/Medium severity, Phase 1.5 hardening sweep'in dışında kaldı, Phase 6 candidate.
  • npm audit: 0 vulnerability (CLOSED 2026-06-10). Önceki 7 advisory'nin hepsi HEAD setup'ında zaten unreachable'dı; yine de kalıcı çözüm olarak koordineli Next.js 14→15 + React 18→19 + NextAuth v4→v5 upgrade yapıldı (commit 3a9cd56) — 7→0. Nested postcss advisory'si overrides ile kapandı. Upgrade'in auth invariant'ları bağımsız güvenlik ajanı ile doğrulandı (8/8 korunmuş, NO FINDINGS).

Tüm kapsam kararlarının kanonik kaynağı: docs/SCOPE_DECISIONS.md (Z.1..Z.13 mentor decisions consolidated).


Test Mimarisi

  • Vitest1144 birim/entegrasyon testi, 120 test dosyası, hybrid environment (Node default + jsdom opt-in per-file Faz 4+ component testleri için)
    • axe-core integration, React Testing Library, vitest-axe matchers
    • MSW onUnhandledRequest: 'error' — mock-lanmamış network call testi fail ediyor
    • Hermetic discipline: vi.stubEnv exclusive, vi.useFakeTimers zorunlu time-sensitive testler için
  • Playwright — 9 aktif E2E + dokümante skip'ler, Chromium-only, üretim siberlab.dev baseline
    • 3 user journey: auth bootstrap / Lab L1 solve / portfolio cert CRUD
    • GitHub Actions: .github/workflows/e2e.yml (push + workflow_dispatch)
  • ESLintnext/core-web-vitals preset, 0 error / 0 warning baseline (Wave 8 closure)
  • TypeScript — strict mode, npx tsc --noEmit clean on every commit
  • Coverage floor — currently 44/36/39/46 (statements/branches/functions/lines, vitest.config.ts), ratcheted from baseline 38/30/33/40 across the Phase 9 audit chain
  • Gatenpm run verify (typecheck + lint + test), CI yeşil
  • Round-7 lessons: tests pin the CONSUMER seam not just the helper; when a feature is RELOCATED, every side-control (rate-limit/audit/validation) MUST be audited at the new location

Hızlı Başlangıç

# Bağımlılıklar
npm install

# Geliştirme sunucusu
npm run dev          # http://localhost:3000

# Doğrulama
npm run verify       # typecheck + lint + 1144 vitest tests (CI gate)
npm run test         # 1144 vitest tests only
npm run lint         # ESLint 0E/0W
npm run build        # production build (env-free per A-17)

# End-to-end (local seeded SQLite; projeler: journeys-authed / journeys-anon)
npm run e2e          # = npx playwright test

Ortam değişkenleri için .env.example referans alınmalıdır. Üretim ortamı Supabase + Resend integration kullanır.


Audit Closure Özeti

Namespace Toplam RESOLVED PARTIAL DOC-ACCEPT DEFERRED / OPEN RECLASSIFIED / ACCEPTED
R-XX (Faz 1) 22 13 0 0 6 3
R-LAB (Faz 2) 15 13 0 1 0 1
R-API (Faz 3) 15 14 0 0 0 1
R-UI (Faz 4) 15 13 1 1 0 0
R-E2E (Faz 5) 13 0 3 0 10 0
A-XX (amendments) 22 20 + 2 ACK 0 0 0 0

Kümülatif scope-bounded closure: 50 / 60 inventory item (83 %); PARTIAL dahil 53 / 60 (88 %).

Final Tarama (AI auditor simulation, docs/audit/FINAL_SCAN_REPORT.md): 15 finding (6 DOCUMENTED + 7 NOTE + 2 ACTION); Wave 8'de her iki ACTION da SHIPPED, 0 outstanding.

Detaylı namespace-bazlı tablolar ve commit hash referansları: docs/AUDIT_README.md.


Engineering Pattern'leri

Closure cycle boyunca 18 isimli mühendislik pattern'i isimlendirildi, uygulandı veya genişletildi:

  • Defense-in-depth two-layer (6 instance): input sanitization + output safe-default rendering
  • Gap-test → regression-guard lifecycle (2 transition): T-MO-CHMOD-EQ-GAP, T-CAP-A11-GAP
  • Z.10 production-vs-blueprint discipline: state gathering MUST verify production
  • Mentor-error correction protocol (6 instance)
  • Honest deferral with explicit reason
  • axe-smoke per-modal pattern (7 instance)
  • Belt-and-suspenders nested ErrorBoundary
  • Bypass-with-justification (Pattern § 9, Wave 8'de 7 inline-disable instance ile genişledi)

Tüm pattern'ler dosya / cycle referansları ile: docs/PATTERN_CATALOG.md.


Repoyu Nasıl Okumalı

Önerilen okuma sırası (kısa → derin):

  1. README.md (bu dosya) — Türkçe genel bakış, demo link, hızlı başlangıç
  2. docs/AUDIT_README.md — kapsamlı İngilizce audit-grade dokümantasyon (AI auditor first-read)
  3. docs/audit/INDEX.md — 5 faz audit raporu navigatörü + wave closure tablosu
  4. docs/SCOPE_DECISIONS.md — Z.1–Z.13 mentor kararları + Wave 5/6/7/8 operatör onayları
  5. docs/PATTERN_CATALOG.md — 18 mühendislik pattern'i + instance lineage
  6. docs/audit/FINAL_SCAN_REPORT.md — AI auditor simulation (7 layer scan + finding classification)
  7. Faz audit raporları (sırayla):
  8. docs/audit/phase-1-a-pending-amendments.md — A-01..A-23 amendment ledger
  9. CLAUDE.md — proje konvansiyonları, Faz yol haritası, Testing & Phase Discipline Protocol

Mimari / migration dokümanları (audit-orthogonal):


Lisans

Bu proje özel bir capstone projesidir. Lisans koşulları operatör tarafından belirlenecektir. Şu an itibarıyla yeniden dağıtım lisansı yoktur.


Acknowledgements

Mentor rehberliğinde, audit-driven engineering discipline'i demonstre etmek için geliştirilen capstone projesi. Wave-based closure cadence, sub-stage stop-checkpoint disiplini ve audit-trail honesty protokolü CLAUDE.md içinde tekrar kullanılabilir konvansiyon olarak dokümantedir.


Capstone notu: Bu proje, 826 küçük ve izlenebilir commit'lik bir geçmiş (audit-driven disiplinin kanıtı: her kapanış commit mesajında kök neden, audit ID'si ve regression-test referansı bulunur — git log bu projenin denetim defteridir) · çok-turlu audit chain (Phase 9 + Round 7/8/9 dahili + 3 harici panel-of-judges turu + iç yakınsama turu) sonucunda FREEZE-READY (audit-clean, 2026-06-10; Next.js 15 + React 19 + NextAuth v5, npm audit 0) duruma getirilmiştir. Tüm akışlar canlı siberlab.dev hesabıyla operator tarafından doğrulanmış, bilinen production-exploitable Critical/High/Medium açığı ve açık Low yoktur. Tüm açık ve kapalı maddeler şeffaf şekilde dokümantedir. AI code auditor veya insan reviewer tarafından yapılacak detaylı incelemeler için yukarıdaki "Repoyu Nasıl Okumalı" sırası takip edilmelidir.

About

Cybersecurity portfolio + education platform — Next.js 14 + Supabase Postgres + Vercel. Audit-grade engineering: 941 tests, 13 review passes, live at siberlab.dev

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors