Next.js 16, Prisma 7, Tailwind 4 und Vitest/Playwright, Konfiguration aus Laufzettel übernommen, weil dort derselbe Stack erprobt ist. Die Farben der Branding-Vorgabe stehen als Tokens in globals.css, das helle Theme setzt dieselben Namen neu. Amber und Rot sind dort abgedunkelt, sonst reicht der Kontrast nicht – ein Test prüft beide Themes gegen 4,5:1. Anmeldung mit lokalem Benutzer, Rolle je Anfrage aus der Datenbank, Audit-Log per Trigger nur anhängbar. Geprüft im gebauten Stand auf 1440 px und 390 px. Closes #001 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
594 B
TypeScript
17 lines
594 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { sicherheitsrichtlinie } from "@/proxy";
|
|
|
|
describe("Content-Security-Policy", () => {
|
|
it("ist im gebauten Stand streng", () => {
|
|
const csp = sicherheitsrichtlinie("abc", false);
|
|
expect(csp).toContain("script-src 'self' 'nonce-abc' 'strict-dynamic'");
|
|
expect(csp).not.toContain("unsafe-eval");
|
|
expect(csp).not.toContain("ws:");
|
|
expect(csp).toContain("frame-ancestors 'none'");
|
|
});
|
|
|
|
it("lockert nur im Entwicklungsmodus", () => {
|
|
expect(sicherheitsrichtlinie("abc", true)).toContain("'unsafe-eval'");
|
|
});
|
|
});
|