mirror of
https://github.com/db9979/wibosim.git
synced 2026-12-06 13:34:09 +01:00
- H1 staticZip: Schlüssel = aufgelöste Datei, Pfade mit // an next(), Packen nur asynchron in einer Warteschlange (Vorpacken beim Start), Einträge/Bytes begrenzt - H2 Login-Bremse je Name + Adresse mit wachsender Wartezeit, harte Namenssperre nur bei verteiltem Raten (bekannte Adressen ausgenommen); Warnung im Protokoll bei X-Forwarded-For von nicht vertrauter privater Adresse; docker-compose: Caddy mit fester Adresse, TRUST_PROXY fest darauf - M2 WebSocket: Grenze je Adresse ohne Ausnahme für X-Forwarded-For, WS_MAX_TOTAL 400, anonyme Verbindungen getrennt begrenzt und nach 10 Minuten geschlossen (4003) - M3 Port 8086 per WIBOSIM_BIND=127.0.0.1 nur lokal; Doku zu TRUST_PROXY - M4 Actions auf Commit-SHAs; Vorschlag Signatur/Prüfung der Images in BETRIEB.md - L1 Passwortwechsel widerruft MCP-Schlüssel (abwählbar) und beendet MCP-Sitzungen - L2 gespeicherter LLM-Schlüssel nur an die gespeicherte Adresse - L3 Fehlerberichte: Ratenbegrenzung vor dem Body-Parser, anonym ohne Screenshot, Ablage 50 MB ohne Verdrängen angemeldeter Berichte, Mails gedrosselt - L4 keine Links im Text von Einladungsmails - L5 Einrichtungscode uid(12), /api/invite/:code meldet ihn nicht als gültig - Hinweise: /metrics und /api/players/online nur lokal oder mit OPS_TOKEN, CSP connect-src nur eigener Host + form-action, Permissions-Policy, Mail-Adressen in Protokollen geschwärzt, Container mit no-new-privileges und cap_drop ALL Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
105 lines
3.8 KiB
YAML
105 lines
3.8 KiB
YAML
name: CI
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
tags: ['v*']
|
||
pull_request:
|
||
workflow_dispatch:
|
||
|
||
concurrency:
|
||
group: ci-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
jobs:
|
||
test:
|
||
runs-on: ubuntu-latest
|
||
defaults:
|
||
run:
|
||
working-directory: server
|
||
steps:
|
||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||
with:
|
||
node-version: 22
|
||
cache: npm
|
||
cache-dependency-path: server/package-lock.json
|
||
- run: npm ci
|
||
- run: npm test
|
||
|
||
smoke:
|
||
# Browser-Smoketest (scripts/smoke.mjs): eigener Job, läuft parallel zu „test“ und bremst ihn nicht.
|
||
# Playwright ist kein Teil der Abhängigkeiten – hier nur für diesen Lauf installiert, Chromium wird zwischengespeichert.
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 6
|
||
defaults:
|
||
run:
|
||
working-directory: server
|
||
env:
|
||
PLAYWRIGHT_VERSION: 1.63.0
|
||
steps:
|
||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||
with:
|
||
node-version: 22
|
||
cache: npm
|
||
cache-dependency-path: server/package-lock.json
|
||
- run: npm ci
|
||
- run: npm install --no-save --no-audit --no-fund playwright@${{ env.PLAYWRIGHT_VERSION }}
|
||
- id: pwcache
|
||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||
with:
|
||
path: ~/.cache/ms-playwright
|
||
key: playwright-${{ runner.os }}-${{ env.PLAYWRIGHT_VERSION }}-chromium-shell
|
||
- if: steps.pwcache.outputs.cache-hit != 'true'
|
||
run: npx playwright install --with-deps --only-shell chromium
|
||
- if: steps.pwcache.outputs.cache-hit == 'true'
|
||
run: npx playwright install-deps chromium
|
||
- run: node scripts/smoke.mjs --shots smoke-shots
|
||
- if: failure()
|
||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||
with:
|
||
name: smoke-screenshots
|
||
path: server/smoke-shots
|
||
retention-days: 7
|
||
|
||
image:
|
||
# Multi-Arch-Image (amd64 + arm64 für den Raspberry Pi) nach ghcr.io – nur nach erfolgreichen Tests und Smoketest auf main/Tags
|
||
needs: [test, smoke]
|
||
if: github.event_name != 'pull_request'
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: read
|
||
packages: write
|
||
steps:
|
||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||
with:
|
||
registry: ghcr.io
|
||
username: ${{ github.actor }}
|
||
password: ${{ secrets.GITHUB_TOKEN }}
|
||
- id: built
|
||
run: echo "at=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||
- id: meta
|
||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
||
with:
|
||
images: ghcr.io/${{ github.repository }}
|
||
tags: |
|
||
type=raw,value=latest,enable={{is_default_branch}}
|
||
type=sha,format=short
|
||
type=semver,pattern={{version}}
|
||
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||
with:
|
||
context: .
|
||
platforms: linux/amd64,linux/arm64
|
||
push: true
|
||
tags: ${{ steps.meta.outputs.tags }}
|
||
labels: ${{ steps.meta.outputs.labels }}
|
||
build-args: |
|
||
VERSION=${{ github.sha }}
|
||
BUILT_AT=${{ steps.built.outputs.at }}
|
||
cache-from: type=gha
|
||
cache-to: type=gha,mode=max
|