Security suites from the 2026-12 audit: static rules, attack probes, per-class tests, gate

- doctor: code-patterns (unescaped HTML/JSON-LD, eval, shell, NEXT_PUBLIC_ secrets,
  overrideAccess / Local API user, where from the request, redirects and fetches to a
  request address) and config-dangerous; live-probes runs the safe attack probes on --url
- ATTACK_PROBES / runAttackProbes / createProbeContext exported from /doctor; the reference
  site runs all of them in pnpm e2e:built (both bundlers) plus CSRF and cookie flags;
  project template iapl-audit/resources/attack-probes.spec.template.ts
- test/securityPatterns.test.ts gates every hit against test/security-patterns.allow.json;
  test/securityClasses.test.ts covers XSS, redirects, pollution, logs, DoS, cache poisoning
- pnpm security:gate (pnpm audit --prod, the two suites, optional offline ZAP) in prepublishOnly
- audit findings F1, F3, F4, F5 reproduced as expected-to-fail tests/probes; no fix built
- docs: security.md threat list + Security suites, doctor.md, AGENT.md, CHANGELOG, skills

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 16:46:42 +01:00
co-authored by Claude Opus 5.5
parent a416411f01
commit d2f19095dc
25 changed files with 1400 additions and 5 deletions
+2 -1
View File
@@ -134,9 +134,10 @@
"lint:fix": "eslint ./src ./test --fix",
"perf:measure": "node scripts/perf-measure.mjs",
"prepare": "pnpm build",
"prepublishOnly": "pnpm clean && pnpm build && pnpm build:starter && pnpm test:int && pnpm starter:gate",
"prepublishOnly": "pnpm clean && pnpm build && pnpm build:starter && pnpm test:int && pnpm starter:gate && pnpm security:gate",
"reference:index": "node scripts/reference-index.mjs",
"routes:check": "node scripts/routes-check.mjs",
"security:gate": "node scripts/security-gate.mjs",
"starter:gate": "node scripts/starter-gate.mjs",
"test": "pnpm test:int && pnpm test:e2e",
"test:e2e": "playwright test",