- Added helmet for security headers and configured content security policy - Implemented CORS with a whitelist for allowed origins - Introduced express-validator for input validation in API endpoints - Set request size limits to prevent DoS attacks - Added global error handling and 404 response - Updated TypeScript configuration to use node16 module resolution - Improved Docker Compose configuration for security and resource limits - Created a comprehensive .env.example for environment configuration - Implemented automated security scans in CI/CD with Trivy - Added cleanup script for debugging ports - Established a detailed security policy document
83 lines
2.2 KiB
JSON
83 lines
2.2 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Clean Debug Ports",
|
|
"type": "shell",
|
|
"command": "bash ${workspaceFolder}/.vscode/cleanup-ports.sh",
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Wait for Backend Ready",
|
|
"type": "shell",
|
|
"command": "bash -lc 'for i in {1..120}; do if (echo > /dev/tcp/127.0.0.1/3001) >/dev/null 2>&1; then exit 0; fi; sleep 1; done; echo \"Backend not ready on :3001\"; exit 1'",
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Start Backend (watch + inspect)",
|
|
"type": "shell",
|
|
"command": "npx tsx watch --inspect=9229 ./src/index.ts",
|
|
"isBackground": true,
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/Server",
|
|
"env": {
|
|
"PORT": "3001"
|
|
}
|
|
},
|
|
"dependsOn": "Clean Debug Ports",
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "backend-ready",
|
|
"fileLocation": ["absolute"],
|
|
"pattern": {
|
|
"regexp": "^(.*)$",
|
|
"message": 1
|
|
},
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": "Starte Datenbankinitialisierung|Server läuft unter http://localhost:3001",
|
|
"endsPattern": "NotificationScheduler erfolgreich initialisiert"
|
|
}
|
|
}
|
|
],
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "dedicated",
|
|
"clear": false
|
|
}
|
|
},
|
|
{
|
|
"label": "Start Vite (after backend ready)",
|
|
"type": "npm",
|
|
"script": "frontend",
|
|
"isBackground": true,
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/Client"
|
|
},
|
|
"dependsOn": "Wait for Backend Ready",
|
|
"dependsOrder": "sequence",
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "vite",
|
|
"fileLocation": ["relative", "${workspaceFolder}"],
|
|
"pattern": {
|
|
"regexp": "^(.*)$",
|
|
"file": 1,
|
|
"message": 1
|
|
},
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": "VITE|ready in",
|
|
"endsPattern": "localhost:3000"
|
|
}
|
|
}
|
|
],
|
|
"presentation": {
|
|
"reveal": "always",
|
|
"panel": "dedicated",
|
|
"clear": false
|
|
}
|
|
}
|
|
]
|
|
}
|