diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..4b21747 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + verify: + name: Build, lint and test + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.work + cache-dependency-path: | + go.work + backend/go.mod + console-proxy/go.mod + worker/go.mod + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: frontend/package-lock.json + + - name: Install frontend dependencies + run: npm ci --prefix frontend + + - name: Verify + run: make verify + + secret-scan: + name: Secret scan + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run Gitleaks + uses: docker://zricethezav/gitleaks:v8.28.0 + with: + args: detect --source=. --config=.gitleaks.toml --redact --verbose diff --git a/.gitleaks.toml b/.gitleaks.toml new file mode 100644 index 0000000..518f208 --- /dev/null +++ b/.gitleaks.toml @@ -0,0 +1,10 @@ +title = "ProxUI Gitleaks configuration" + +[allowlist] +description = "Allow documented upstream Supabase example values only." +paths = [ + '''deploy/supabase/\.env\.example''', + '''deploy/supabase/CONFIG\.md''', + '''deploy/supabase/CHANGELOG\.md''', + '''deploy/supabase/tests/.*''', +] diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f12d9..20ce735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Forgejo-Actions-CI mit Go/Frontend-Verifikation und Gitleaks-Secret-Scan angelegt. - E0-T01 begonnen: Monorepo-Grundstruktur, Root-Dokumentation, Env-Beispiel und minimale Service-Startpunkte angelegt. - Annahme dokumentiert: vorlaeufiger Modulpfad ist `proxui`. - E0-T02 vorbereitet: Makefile-Targets und ESLint-Config angelegt; fehlgeschlagener reduzierter Supabase-Compose wurde entfernt, naechster Ansatz ist die offizielle Supabase-Self-Hosted-Konfiguration. diff --git a/README.md b/README.md index ed6f7bf..e76f98f 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,13 @@ Aktuelle Targets: - `make dev-logs`: Supabase-Logs verfolgen - `make migrate`: Platzhalter bis E2-T01 `golang-migrate` einbindet +## CI + +Forgejo Actions laufen unter `.forgejo/workflows/ci.yml`. + +- `verify`: installiert Go/Node-Abhaengigkeiten und fuehrt `make verify` aus. +- `secret-scan`: fuehrt `zricethezav/gitleaks:v8.28.0` mit `.gitleaks.toml` aus. Die Konfiguration erlaubt nur dokumentierte Beispielwerte aus den offiziellen Supabase-Upstream-Dateien. + ## Sicherheitsregeln - Nur Backend, Worker und Console-Proxy sprechen mit Proxmox. diff --git a/TODO.md b/TODO.md index 6c51c53..e55b444 100644 --- a/TODO.md +++ b/TODO.md @@ -17,10 +17,13 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda - [x] Projekt-spezifische ENV-Datei aus offizieller Vorlage ableiten - [x] Infrastruktur testweise starten - [x] Healthchecks/Erreichbarkeit pruefen +- [x] E0-T03: CI-Pipeline mit Build, Lint, Tests und Secret-Scan + - [x] Forgejo-Actions-Workflow fuer Pushes auf `main` und Pull Requests angelegt + - [x] Go- und Frontend-Verifikation ueber `make verify` eingebunden + - [x] Gitleaks-Secret-Scan mit enger Allowlist fuer offizielle Supabase-Beispieldateien eingebunden ## Naechste Aufgaben -- [ ] E0-T03: CI-Pipeline mit Build, Lint, Tests und Secret-Scan - [ ] E0-T04: Konfigurations- und Logging-Layer fuer Go-Dienste - [ ] E2-T01: Migrations-Setup mit `golang-migrate` @@ -58,3 +61,5 @@ Arbeitsliste auf Basis von `proxmox-console-entwicklungsplan.md`. Die Entwurfsda - 2026-06-09: Offizielle Supabase-Self-Hosted-Docker-Dateien nach `deploy/supabase/` kopiert; `docker compose config` erfolgreich. - 2026-06-09: `make dev` mit offiziellem Supabase-Stack erfolgreich; alle offiziellen Supabase-Container healthy. - 2026-06-09: `GET /auth/v1/admin/users` ueber Kong mit Service-Role-Key erfolgreich: leere User-Liste statt Studio-Fehler. +- 2026-06-10: CI-Workflow fuer Forgejo Actions angelegt; lokales `make verify` erfolgreich. +- 2026-06-10: Gitleaks-Secret-Scan lokal mit `zricethezav/gitleaks:v8.28.0` erfolgreich; keine Leaks gefunden.