'use client' /** * SBOM (Software Bill of Materials) - Lern-Wizard * * Interaktiver Wizard zum Verstehen der SBOM: * - Was ist eine SBOM? * - Warum ist sie wichtig? * - Kategorien erklaert * - Breakpilot Drive (Unity/C#/Game) Komponenten * - Lizenzen und Compliance */ import { useState } from 'react' import Link from 'next/link' // ============================================== // Types // ============================================== type StepStatus = 'pending' | 'active' | 'completed' interface WizardStep { id: string name: string icon: string status: StepStatus } // ============================================== // Constants // ============================================== const STEPS: WizardStep[] = [ { id: 'welcome', name: 'Willkommen', icon: '๐Ÿ“‹', status: 'pending' }, { id: 'what-is-sbom', name: 'Was ist SBOM?', icon: 'โ“', status: 'pending' }, { id: 'why-important', name: 'Warum wichtig?', icon: 'โš ๏ธ', status: 'pending' }, { id: 'categories', name: 'Kategorien', icon: '๐Ÿ“', status: 'pending' }, { id: 'infrastructure', name: 'Infrastruktur', icon: '๐Ÿ—๏ธ', status: 'pending' }, { id: 'unity-game', name: 'Unity & Game', icon: '๐ŸŽฎ', status: 'pending' }, { id: 'licenses', name: 'Lizenzen', icon: '๐Ÿ“œ', status: 'pending' }, { id: 'summary', name: 'Zusammenfassung', icon: 'โœ…', status: 'pending' }, ] const EDUCATION_CONTENT: Record = { 'welcome': { title: 'Willkommen zum SBOM-Wizard!', content: [ 'Eine **Software Bill of Materials (SBOM)** ist wie ein Zutaten-Etikett fuer Software.', 'Sie listet alle Komponenten auf, aus denen eine Anwendung besteht:', 'โ€ข Open-Source-Bibliotheken', 'โ€ข Frameworks und Engines', 'โ€ข Infrastruktur-Dienste', 'โ€ข Entwicklungs-Tools', 'In diesem Wizard lernst du, warum SBOMs wichtig sind und welche Komponenten BreakPilot verwendet - inklusive der neuen **Breakpilot Drive** (Unity) Komponenten.', ], tips: [ 'SBOMs sind seit 2021 fuer US-Regierungsauftraege Pflicht', 'Die EU plant aehnliche Vorschriften im Cyber Resilience Act', ], }, 'what-is-sbom': { title: 'Was ist eine SBOM?', content: [ '**SBOM = Software Bill of Materials**', 'Eine SBOM ist eine vollstaendige Liste aller Software-Komponenten:', '**Enthaltene Informationen:**', 'โ€ข Name der Komponente', 'โ€ข Version', 'โ€ข Lizenz (MIT, Apache, GPL, etc.)', 'โ€ข Herkunft (Source URL)', 'โ€ข Typ (Library, Service, Tool)', '**Formate:**', 'โ€ข SPDX (Linux Foundation Standard)', 'โ€ข CycloneDX (OWASP Standard)', 'โ€ข SWID Tags (ISO Standard)', 'BreakPilot verwendet eine eigene Darstellung im Admin-Panel, die alle relevanten Infos zeigt.', ], tips: [ 'Eine SBOM ist wie ein Beipackzettel fuer Medikamente', 'Sie ermoeglicht schnelle Reaktion bei Sicherheitsluecken', ], }, 'why-important': { title: 'Warum sind SBOMs wichtig?', content: [ '**1. Sicherheit (Security)**', 'Wenn eine Sicherheitsluecke in einer Bibliothek entdeckt wird (z.B. Log4j), kannst du sofort pruefen ob du betroffen bist.', '**2. Compliance (Lizenz-Einhaltung)**', 'Verschiedene Lizenzen haben verschiedene Anforderungen:', 'โ€ข MIT: Fast keine Einschraenkungen', 'โ€ข GPL: Copyleft - abgeleitete Werke muessen auch GPL sein', 'โ€ข Proprietary: Kommerzielle Nutzung eingeschraenkt', '**3. Supply Chain Security**', 'Moderne Software besteht aus hunderten Abhaengigkeiten. Eine SBOM macht diese Kette transparent.', '**4. Regulatorische Anforderungen**', 'US Executive Order 14028 verlangt SBOMs fuer Regierungssoftware.', ], tips: [ 'Log4Shell (2021) betraf Millionen von Systemen', 'Mit SBOM: Betroffenheit in Minuten geprueft', ], }, 'categories': { title: 'SBOM-Kategorien in BreakPilot', content: [ 'Die BreakPilot SBOM ist in Kategorien unterteilt:', '**infrastructure** (Blau)', 'โ†’ Kern-Infrastruktur: PostgreSQL, Valkey, Keycloak, Docker', '**security-tools** (Rot)', 'โ†’ Sicherheits-Tools: Trivy, Gitleaks, Semgrep', '**python** (Gelb)', 'โ†’ Python-Backend: FastAPI, Pydantic, httpx', '**go** (Cyan)', 'โ†’ Go-Services: Gin, GORM, JWT', '**nodejs** (Gruen)', 'โ†’ Frontend: Next.js, React, Tailwind', '**unity** (Amber) โ† NEU!', 'โ†’ Game Engine: Unity 6, URP, TextMeshPro', '**csharp** (Fuchsia) โ† NEU!', 'โ†’ C#/.NET: .NET Standard, UnityWebRequest', '**game** (Rose) โ† NEU!', 'โ†’ Breakpilot Drive Service', ], tips: [ 'Klicke auf eine Kategorie um zu filtern', 'Die neuen Unity/Game-Kategorien wurden fuer Breakpilot Drive hinzugefuegt', ], }, 'infrastructure': { title: 'Infrastruktur-Komponenten', content: [ 'BreakPilot basiert auf robuster Infrastruktur:', '**Datenbanken:**', 'โ€ข PostgreSQL 16 - Relationale Datenbank', 'โ€ข Valkey 8 - In-Memory Cache (Redis-Fork)', 'โ€ข ChromaDB - Vector Store fuer RAG', '**Auth & Security:**', 'โ€ข Keycloak 23 - Identity & Access Management', 'โ€ข HashiCorp Vault - Secrets Management', '**Container & Orchestrierung:**', 'โ€ข Docker - Container Runtime', 'โ€ข Traefik - Reverse Proxy', '**Kommunikation:**', 'โ€ข Matrix Synapse - Chat/Messaging', 'โ€ข Jitsi Meet - Video-Konferenzen', ], tips: [ 'Alle Services laufen in Docker-Containern', 'Ports sind in docker-compose.yml definiert', ], }, 'unity-game': { title: 'Unity & Breakpilot Drive', content: [ '**Neu hinzugefuegt fuer Breakpilot Drive:**', '**Unity Engine (6000.0)**', 'โ†’ Die Game Engine fuer das Lernspiel', 'โ†’ Lizenz: Unity EULA (kostenlos bis 100k Revenue)', '**Universal Render Pipeline (17.x)**', 'โ†’ Optimierte Grafik-Pipeline fuer WebGL', 'โ†’ Lizenz: Unity Companion License', '**TextMeshPro (3.2)**', 'โ†’ Fortgeschrittenes Text-Rendering', '**Unity Mathematics (1.3)**', 'โ†’ SIMD-optimierte Mathe-Bibliothek', '**Newtonsoft.Json (3.2)**', 'โ†’ JSON-Serialisierung fuer API-Kommunikation', '**C# Abhรคngigkeiten:**', 'โ€ข .NET Standard 2.1', 'โ€ข UnityWebRequest (HTTP Client)', 'โ€ข System.Text.Json', ], tips: [ 'Unity 6 ist die neueste LTS-Version', 'WebGL-Builds sind ~30-50 MB gross', ], }, 'licenses': { title: 'Lizenz-Compliance', content: [ '**Lizenz-Typen in BreakPilot:**', '**Permissive (Unkompliziert):**', 'โ€ข MIT - Die meisten JS/Python Libs', 'โ€ข Apache 2.0 - FastAPI, Keycloak', 'โ€ข BSD - PostgreSQL', '**Copyleft (Vorsicht bei Aenderungen):**', 'โ€ข GPL - Wenige Komponenten', 'โ€ข AGPL - Jitsi (Server-Side OK)', '**Proprietary:**', 'โ€ข Unity EULA - Kostenlos bis 100k Revenue', 'โ€ข Unity Companion - Packages an Engine gebunden', '**Wichtig:**', 'Alle verwendeten Lizenzen sind mit kommerziellem Einsatz kompatibel. Bei Fragen: Rechtsabteilung konsultieren.', ], tips: [ 'MIT und Apache 2.0 sind am unproblematischsten', 'AGPL erfordert Source-Code-Freigabe bei Modifikation', ], }, 'summary': { title: 'Zusammenfassung', content: [ 'Du hast die SBOM von BreakPilot kennengelernt:', 'โœ… Was eine SBOM ist und warum sie wichtig ist', 'โœ… Die verschiedenen Kategorien (8 Stueck)', 'โœ… Infrastruktur-Komponenten', 'โœ… Die neuen Unity/Game-Komponenten fuer Breakpilot Drive', 'โœ… Lizenz-Typen und Compliance', '**Im SBOM-Dashboard kannst du:**', 'โ€ข Nach Kategorie filtern', 'โ€ข Nach Namen suchen', 'โ€ข Lizenzen pruefen', 'โ€ข Komponenten-Details ansehen', '**180+ Komponenten** sind dokumentiert und nachverfolgbar.', ], tips: [ 'Pruefe regelmaessig auf veraltete Komponenten', 'Bei neuen Abhaengigkeiten: SBOM aktualisieren', ], }, } // ============================================== // Components // ============================================== function WizardStepper({ steps, currentStep, onStepClick }: { steps: WizardStep[] currentStep: number onStepClick: (index: number) => void }) { return (
{steps.map((step, index) => (
{index < steps.length - 1 && (
)}
))}
) } function EducationCard({ stepId }: { stepId: string }) { const content = EDUCATION_CONTENT[stepId] if (!content) return null return (

๐Ÿ“– {content.title}

{content.content.map((line, index) => (

$1') .replace(/โ†’/g, 'โ†’') .replace(/โ† NEU!/g, 'โ† NEU!') }} /> ))}

{content.tips && content.tips.length > 0 && (

๐Ÿ’ก Tipps:

{content.tips.map((tip, index) => (

โ€ข {tip}

))}
)}
) } function CategoryDemo({ stepId }: { stepId: string }) { if (stepId === 'categories') { const categories = [ { name: 'infrastructure', color: 'blue', count: 45 }, { name: 'security-tools', color: 'red', count: 12 }, { name: 'python', color: 'yellow', count: 35 }, { name: 'go', color: 'cyan', count: 18 }, { name: 'nodejs', color: 'green', count: 55 }, { name: 'unity', color: 'amber', count: 7, isNew: true }, { name: 'csharp', color: 'fuchsia', count: 3, isNew: true }, { name: 'game', color: 'rose', count: 1, isNew: true }, ] return (

Live-Vorschau: Kategorien

{categories.map((cat) => (

{cat.name}

{cat.count} Komponenten

{cat.isNew && ( NEU )}
))}
) } if (stepId === 'unity-game') { const unityComponents = [ { name: 'Unity Engine', version: '6000.0', license: 'Unity EULA' }, { name: 'URP', version: '17.x', license: 'Unity Companion' }, { name: 'TextMeshPro', version: '3.2', license: 'Unity Companion' }, { name: 'Mathematics', version: '1.3', license: 'Unity Companion' }, { name: 'Newtonsoft.Json', version: '3.2', license: 'MIT' }, ] return (

Unity Packages (Breakpilot Drive)

{unityComponents.map((comp) => (
unity {comp.name}
{comp.version} {comp.license}
))}
) } if (stepId === 'licenses') { const licenses = [ { name: 'MIT', count: 85, color: 'green', risk: 'Niedrig' }, { name: 'Apache 2.0', count: 45, color: 'green', risk: 'Niedrig' }, { name: 'BSD', count: 12, color: 'green', risk: 'Niedrig' }, { name: 'Unity EULA', count: 1, color: 'yellow', risk: 'Mittel' }, { name: 'Unity Companion', count: 6, color: 'yellow', risk: 'Mittel' }, { name: 'AGPL', count: 2, color: 'orange', risk: 'Hoch' }, ] return (

Lizenz-Uebersicht

{licenses.map((lic) => (
{lic.name} ({lic.count})
Risiko: {lic.risk}
))}
) } return null } // ============================================== // Main Component // ============================================== export default function SBOMWizardPage() { const [currentStep, setCurrentStep] = useState(0) const [steps, setSteps] = useState(STEPS) const currentStepData = steps[currentStep] const isWelcome = currentStepData?.id === 'welcome' const isSummary = currentStepData?.id === 'summary' const goToNext = () => { if (currentStep < steps.length - 1) { setSteps(prev => prev.map((step, idx) => idx === currentStep && step.status === 'pending' ? { ...step, status: 'completed' } : step )) setCurrentStep(prev => prev + 1) } } const goToPrev = () => { if (currentStep > 0) { setCurrentStep(prev => prev - 1) } } const handleStepClick = (index: number) => { setCurrentStep(index) } return (
{/* Header */}

๐Ÿ“‹ SBOM Lern-Wizard

Software Bill of Materials verstehen

โ† Zurueck zur SBOM
{/* Stepper */}
{/* Content */}
{/* Step Header */}
{currentStepData?.icon}

Schritt {currentStep + 1}: {currentStepData?.name}

{currentStep + 1} von {steps.length}

{/* Education Card */} {/* Category Demo */} {/* Welcome Start Button */} {isWelcome && (
)} {/* Summary Actions */} {isSummary && (
๐Ÿ“‹ Zur SBOM
)} {/* Navigation */} {!isWelcome && (
{!isSummary && ( )}
)}
{/* Footer Info */}
BreakPilot SBOM - 180+ Komponenten dokumentiert
) }