cms.c2sgmbh/package.json
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

77 lines
3 KiB
JSON

{
"name": "payload-cms",
"version": "1.0.0",
"description": "A blank template to get started with Payload 3.0",
"license": "MIT",
"type": "module",
"scripts": {
"build": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=2048\" next build",
"dev": "cross-env NODE_OPTIONS=--no-deprecation next dev",
"devsafe": "rm -rf .next && cross-env NODE_OPTIONS=--no-deprecation next dev",
"generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap",
"generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types",
"lint": "cross-env NODE_OPTIONS=--no-deprecation next lint",
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload",
"start": "cross-env NODE_OPTIONS=--no-deprecation next start",
"test": "pnpm run test:unit && pnpm run test:int && pnpm run test:e2e",
"test:unit": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts tests/unit",
"test:int": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts tests/int",
"test:security": "cross-env NODE_OPTIONS=--no-deprecation vitest run --config ./vitest.config.mts tests/unit/security tests/int/security-api.int.spec.ts",
"test:e2e": "test -f .next/BUILD_ID || (echo 'Error: No build found. Run pnpm build first.' && exit 1) && cross-env NODE_OPTIONS=\"--no-deprecation --no-experimental-strip-types\" pnpm exec playwright test",
"prepare": "test -d .git && (ln -sf ../../scripts/detect-secrets.sh .git/hooks/pre-commit 2>/dev/null || true) || true"
},
"dependencies": {
"@payloadcms/db-postgres": "3.65.0",
"@payloadcms/next": "3.65.0",
"@payloadcms/plugin-form-builder": "3.65.0",
"@payloadcms/plugin-multi-tenant": "^3.65.0",
"@payloadcms/plugin-nested-docs": "3.65.0",
"@payloadcms/plugin-redirects": "3.65.0",
"@payloadcms/plugin-seo": "3.65.0",
"@payloadcms/richtext-lexical": "3.65.0",
"@payloadcms/translations": "^3.65.0",
"@payloadcms/ui": "3.65.0",
"cross-env": "^7.0.3",
"dotenv": "16.4.7",
"graphql": "^16.8.1",
"ioredis": "^5.8.2",
"next": "15.4.7",
"node-cron": "^4.2.1",
"nodemailer": "^7.0.11",
"payload": "3.65.0",
"react": "19.1.0",
"react-dom": "19.1.0",
"sharp": "0.34.2"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@playwright/test": "1.56.1",
"@testing-library/react": "16.3.0",
"@types/node": "^22.5.4",
"@types/node-cron": "^3.0.11",
"@types/nodemailer": "^7.0.4",
"@types/react": "19.1.8",
"@types/react-dom": "19.1.6",
"@vitejs/plugin-react": "4.5.2",
"eslint": "^9.16.0",
"eslint-config-next": "15.4.7",
"jsdom": "26.1.0",
"playwright": "1.56.1",
"playwright-core": "1.56.1",
"prettier": "^3.2.5",
"typescript": "5.7.3",
"vite-tsconfig-paths": "5.1.4",
"vitest": "3.2.3"
},
"engines": {
"node": "^18.20.2 || >=20.9.0",
"pnpm": "^9 || ^10"
},
"pnpm": {
"onlyBuiltDependencies": [
"sharp",
"esbuild",
"unrs-resolver"
]
}
}