Trek_CN/server/tests
Maurice 9f57ab4517 security: address second-pass audit findings
- CI-C1 false positive: actions/{checkout,setup-node,upload-artifact}
  @v6 do exist (v6.0.0 releases published Oct-Dec 2025). Restore the
  @v6 refs — the earlier batch-1 commit downgraded them unnecessarily.
- Widen idempotency_keys primary key to (key, user_id, method, path)
  via new migration. Batch 1 widened the middleware lookup but left
  the table PK at (key, user_id), so `INSERT OR IGNORE` silently
  skipped the second endpoint that reused a key — the cache was
  never populated for it and a replay re-ran the handler. The
  migration rebuilds the table preserving existing rows (the old
  narrower PK guarantees no conflicts against the new looser key).
- HSTS: keep `includeSubDomains` OFF by default. Enabling it for
  every NODE_ENV=production install would break apex-domain setups
  where siblings still serve HTTP. Operators who want the stricter
  policy opt in with HSTS_INCLUDE_SUBDOMAINS=true.
- Extend the idempotency unit tests to cover the (method, path)
  dimension — same user+key on different path no longer replays.
2026-04-20 21:04:09 +02:00
..
fixtures feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
helpers feat(notices): add system notice infrastructure 2026-04-16 14:36:33 +02:00
integration security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
unit security: address second-pass audit findings 2026-04-20 21:04:09 +02:00
websocket test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
setup.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00