# Security Test Instructions — frontend-shell ## Dependency scan (SECURITY-10, NFR-SEC-05) ```bash pnpm audit:deps # blocking: packages that ship with the site pnpm audit:dev # report only: all packages incl. dev tools ``` - **`audit:deps`**: expected "No known vulnerabilities found". - **`audit:dev`**: reports advisories in dev-only tools and never blocks. Status on 2026-10-18: 5 high, 2 moderate, 1 low. - 7 of them via `@lhci/cli`, 1 via `@chakra-ui/cli`. - None of these packages end up in `dist/`. - Review this list periodically, and when you update those tools. - **`source-map-js`**: held at ≥ 1.2.2 through an override in `pnpm-workspace.yaml` (GHSA-68fv-2mgg-jv7q). ## HTTP security headers (SECURITY-04) Automated: `config/securityHeaders.test.ts` checks that the production CSP has: - no `unsafe-eval` - no `unsafe-inline` for scripts - no `ws:` - `frame-ancestors 'none'` Against the built site: ```bash pnpm build && pnpm preview curl -sI http://localhost:4173/ ``` Expected: - `Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'` - `Strict-Transport-Security: max-age=31536000; includeSubDomains` (browsers only honour it over HTTPS) - `X-Content-Type-Options: nosniff` - `X-Frame-Options: DENY` - `Referrer-Policy: strict-origin-when-cross-origin` The production host must send the same set; that is a follow-up for Operations. ## Other checks | Check | Covered by | |---|---| | External links use `rel="noopener noreferrer"` and only `https:` | Footer and Hero tests, `visibleSocials` property tests | | JSON-LD cannot close its `