cms.c2sgmbh/docs
Martin Porwoll 0cdc25c4f0 feat: comprehensive security test suite
Add 143 security tests covering all security modules:

Unit Tests (125 tests):
- rate-limiter.unit.spec.ts: limiter creation, request tracking,
  blocking, window reset, IP extraction, header generation
- csrf.unit.spec.ts: token generation/validation, origin checking,
  double submit cookie pattern, referer validation
- ip-allowlist.unit.spec.ts: CIDR matching, wildcards, endpoint-
  specific allowlist/blocklist rules, IP extraction
- data-masking.unit.spec.ts: field detection, pattern matching,
  recursive masking, JWT/connection string/private key handling

API Integration Tests (18 tests):
- security-api.int.spec.ts: rate limiting responses, IP blocking,
  CSRF protection on state-changing endpoints

Test Infrastructure:
- tests/helpers/security-test-utils.ts: CSRF token generators,
  mock request builders, environment setup utilities
- vitest.config.mts: updated to include unit tests
- package.json: added test:unit and test:security scripts
- .github/workflows/security.yml: added security-tests CI job

Also updated detect-secrets.sh to ignore .spec.ts and .test.ts
files which may contain example secrets for testing purposes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 00:20:47 +00:00
..
anleitungen feat: comprehensive security test suite 2025-12-08 00:20:47 +00:00
CLAUDE_PAYLOAD_CMS.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
IMPLEMENTIERUNGS-AUFTRAG.md feat: implement multi-tenant email system with logging 2025-12-07 20:16:54 +00:00
INFRASTRUCTURE.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROJECT_STATUS.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
Prompt phase2 blocks.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_CONSENT_PAYLOAD.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_PAYLOAD_API_CONFIG.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_PHASE1_COLLECTIONS.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_PHASE4_CONTENT_MIGRATION.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_PRIVACY_POLICY_PAYLOAD.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
PROMPT_UNIVERSAL_FEATURES_PAYLOAD.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00
SECURITY_FIXES.md test: add E2E and integration tests with documentation 2025-12-01 08:19:52 +00:00