Files
SluijsensandClaude Opus 5.5 069c7cb7eb Adds AI-DLC construction docs for the front-end shell feature
Functional design, NFR requirements, code generation plan and summary,
and build-and-test instructions with results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:05:03 +02:00

45 lines
2.2 KiB
Markdown

# 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 `<script>` element | `jsonLdScript` property test (no `<` or `>` in output) |
| Error page shows no internals | ErrorPage test and integration scenario 5 |
| E-mail address not literally in the build | `grep -rl "info@andreaslop" dist` → no result |
| No third-party resources loaded | Lighthouse network log: only the own origin |
| No inline scripts besides the non-executed JSON-LD data block | `next-themes` removed; CSP `script-src 'self'` with no console violations (Best Practices 100) |