- Critical #1: Add auth check to ingest endpoints (use request.user.id) - Critical #2: Add IDOR protection on group endpoints (userId ownership) - High #3: Register auth middleware in server.ts (populates request.user) - High #4: Add Fastify schema validation to all route handlers - Medium #5: Add NormalizedAlert/CorrelationGroup models to Prisma schema - Medium #6: Sanitize payload storage in normalizer (depth limit, circular ref) - Low #7: Restrict CORS origins (use CORS_ORIGIN env var) Co-Authored-By: Paperclip <noreply@paperclip.ing>
27 lines
612 B
TypeScript
27 lines
612 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/**/*.test.ts', 'src/**/__tests__/**/*.test.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
reportsDirectory: './coverage',
|
|
include: ['src/**/*.ts'],
|
|
exclude: [
|
|
'src/**/*.d.ts',
|
|
'src/**/__tests__/**/*.test.ts',
|
|
'**/node_modules/**',
|
|
],
|
|
thresholds: {
|
|
statements: 80,
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80,
|
|
},
|
|
},
|
|
},
|
|
});
|