security(cards): CSP report-only + service-key rotation playbook
Some checks are pending
CI / validate (push) Waiting to run
Some checks are pending
CI / validate (push) Waiting to run
Folge-Hardening zu e1ddbf3, Cluster A2+A3 aus FEATURE_IDEAS.
* hooks.server.ts: restriktive CSP im Report-Only-Modus
(default-src 'self', script-src 'self', connect-src whitelist
auf cardecky-api/auth.mana.how/share/mcp). CARDS_CSP_ENFORCE=true
flippt auf den scharfen Header.
* docs/playbooks/SERVICE_KEY_ROTATION.md: 5-Schritt-Rotation für
CARDS_DSGVO_SERVICE_KEY bis Phase F-1 (mana-auth-managed Keys).
Forensik der Bypass-Periode 2026-05-08 → 2026-05-12 ist abgeschlossen:
nur 2 user_ids in der Cards-DB, beide legitim (tills95@gmail.com +
Smoke-Test-Sentinel c1a5, letztere via DSGVO-Endpoint aufgeräumt).
Kein ausgenutzter Bypass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e1ddbf34b3
commit
5a29dd9a8c
3 changed files with 164 additions and 14 deletions
|
|
@ -277,10 +277,15 @@ einiges:
|
|||
DENY, X-Content-Type-Options nosniff, Referrer-Policy
|
||||
strict-origin-when-cross-origin, plus HSTS (180 Tage,
|
||||
includeSubDomains) wenn `NODE_ENV=production`.
|
||||
- **CSP bewusst ausgespart** — eine richtige Content-Security-
|
||||
Policy braucht Browser-Test (inline-styles, Theme-Assets,
|
||||
Markdown-Renderer). Eigener Sprint. SVG-Upload-Risiko (oben)
|
||||
bleibt bis dahin ungemildert.
|
||||
- **CSP läuft Report-Only seit 2026-05-12.** `hooks.server.ts`
|
||||
setzt `Content-Security-Policy-Report-Only` mit restriktiver
|
||||
Policy (default-src 'self', script-src 'self', img-src
|
||||
'self' data: blob:, connect-src whitelist auf
|
||||
cardecky-api/auth.mana.how/share/mcp). Violations laufen in
|
||||
die Browser-DevTools-Console. Nach 1-2 Tagen Live-Beobachtung
|
||||
via `CARDS_CSP_ENFORCE=true` auf Enforce flippen. SVG-Upload-
|
||||
Risiko ist dann gemildert (script-src verbietet inline-JS in
|
||||
SVG-Inlinen).
|
||||
- **CORS lässt `localhost` in Prod durch — gebaut 2026-05-12,
|
||||
noch nicht deployed.** Live-Probe hatte
|
||||
`Access-Control-Allow-Origin: http://localhost:9999` gezeigt.
|
||||
|
|
@ -291,10 +296,10 @@ einiges:
|
|||
`/api/v1/me/delete` (Self-Service) liefern jetzt `storage_ok: true|false`
|
||||
+ optional `storage_error` im Response. Frontend zeigt im
|
||||
Account-Delete-Flow eine Fehler-Toast wenn `storage_ok=false`.
|
||||
- **Service-Key-Rotation** — ein statisches `CARDS_DSGVO_SERVICE_KEY`
|
||||
in env, kein Revoke. Phase F-1 ist in `service-key.ts:11`
|
||||
geplant (Verifikation gegen `mana-auth.apps.app_service_keys`).
|
||||
Bis dahin: Rotation-Playbook in `docs/playbooks/` festschreiben.
|
||||
- **Service-Key-Rotation-Playbook — gebaut 2026-05-12.**
|
||||
`docs/playbooks/SERVICE_KEY_ROTATION.md` mit 5-Schritt-Rotation,
|
||||
Tabus, Phase-F-1-Übergang. Bis die mana-auth-managed Variante
|
||||
fertig ist, ist das die SoT.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue