From cfae0661400914d27aeb5d2938c3fef50e331c9e Mon Sep 17 00:00:00 2001 From: Shadowbroker <43977454+BigBodyCobain@users.noreply.github.com> Date: Mon, 17 Aug 2026 01:11:38 -0600 Subject: [PATCH] test(security): update API matcher security expectation --- .../src/__tests__/csp/cspProductionHardening.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/__tests__/csp/cspProductionHardening.test.ts b/frontend/src/__tests__/csp/cspProductionHardening.test.ts index dab662e..f0eb3e9 100644 --- a/frontend/src/__tests__/csp/cspProductionHardening.test.ts +++ b/frontend/src/__tests__/csp/cspProductionHardening.test.ts @@ -6,7 +6,7 @@ * inline fallback required by the Next.js production runtime * 2. Dev CSP retains 'unsafe-inline' and 'unsafe-eval' * 3. Unchanged directives (style-src, font-src, worker-src, etc.) intact - * 4. API/static route exclusions remain intact + * 4. API security-boundary matching and static route exclusions remain intact * 5. isDev is evaluated per-request (not cached at module load) */ @@ -177,12 +177,12 @@ describe('unchanged directives in production', () => { }); // --------------------------------------------------------------------------- -// 4. API/static route exclusions remain intact +// 4. API security boundary / static route exclusions remain intact // --------------------------------------------------------------------------- -describe('matcher exclusions unchanged', () => { - it('excludes /api paths', () => { - expect(matcherExcludes('/api/mesh/events')).toBe(true); +describe('matcher security boundary and exclusions', () => { + it('includes /api paths so privileged requests can be screened', () => { + expect(matcherExcludes('/api/mesh/events')).toBe(false); }); it('excludes /_next/static paths', () => {