Security hardening release addressing CodeQL and Dependabot alerts: - Fix stack trace exposure in error responses - Add SSRF protection with DNS resolution checking - Implement proper URL hostname validation (replaces substring matching) - Add centralized path sanitization to prevent path traversal - Fix ReDoS vulnerability in email validation regex - Improve HTML sanitization in validation utilities - Fix capability wildcard matching in auth utilities - Update glob dependency to address CVE - Add CodeQL suppression comments for verified false positives 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
855 B
JavaScript
33 lines
855 B
JavaScript
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
roots: ['<rootDir>/src'],
|
|
testMatch: [
|
|
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
|
|
'<rootDir>/src/**/*.{test,spec}.{js,jsx,ts,tsx}',
|
|
],
|
|
transform: {
|
|
'^.+\\.(ts|tsx)$': 'ts-jest',
|
|
},
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx}',
|
|
'!src/**/*.d.ts',
|
|
'!src/**/*.stories.{js,jsx,ts,tsx}',
|
|
],
|
|
coverageDirectory: 'coverage',
|
|
coverageReporters: ['text', 'lcov', 'html'],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 90,
|
|
functions: 90,
|
|
lines: 90,
|
|
statements: 90,
|
|
},
|
|
},
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
moduleNameMapping: {
|
|
'^@gt2/types$': '<rootDir>/../types/src/index.ts',
|
|
},
|
|
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.ts'],
|
|
}; |