SECURITY FIXES: - Remove dangerous public DELETE /api/locations/:id endpoint - Add rate limiting to POST /api/locations (10 requests per 15 minutes) - Add input validation with length limits (500 chars address, 1000 chars description) - Add suspicious activity logging for abuse detection - Install express-rate-limit for protection against spam/DoS CHANGES: - Removed LocationDeleteRequest interface (no longer needed) - Updated tests to expect new security validation behavior - Added comprehensive tests for length validation - Fixed test setup issue with undefined constants Security Impact: - CRITICAL: Prevents unauthorized deletion of location reports - HIGH: Prevents spam submissions and DoS attacks - MEDIUM: Prevents buffer overflow and injection attacks via oversized inputs All 125 tests passing with new security validations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
2 KiB
JSON
64 lines
2 KiB
JSON
{
|
|
"name": "great-lakes-ice-report",
|
|
"version": "1.0.0",
|
|
"description": "Great Lakes Ice Report - Community-driven winter road conditions tracker for Michigan",
|
|
"main": "dist/server.js",
|
|
"scripts": {
|
|
"start": "npm run build && node dist/server.js",
|
|
"dev": "npm run build-css && npm run dev:ts",
|
|
"dev:ts": "concurrently \"tsc --watch\" \"nodemon dist/server.js\"",
|
|
"dev:js": "npm run build-css && nodemon server.js",
|
|
"build-css": "sass src/scss/main.scss public/style.css --style=compressed",
|
|
"build-css:dev": "sass src/scss/main.scss public/style.css --style=expanded --source-map",
|
|
"watch-css": "sass src/scss/main.scss public/style.css --watch --style=expanded --source-map",
|
|
"dev-with-css": "concurrently \"npm run watch-css\" \"npm run dev\"",
|
|
"dev-with-css:ts": "concurrently \"npm run watch-css\" \"npm run dev:ts\"",
|
|
"build": "npm run build:ts && npm run build-css",
|
|
"build:ts": "tsc",
|
|
"test": "jest --runInBand --forceExit",
|
|
"test:coverage": "jest --coverage",
|
|
"postinstall": "npm run build-css"
|
|
},
|
|
"dependencies": {
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^17.0.1",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^7.5.1",
|
|
"node-cron": "^3.0.3",
|
|
"sqlite3": "^5.1.6",
|
|
"swagger-jsdoc": "^6.2.8",
|
|
"swagger-ui-express": "^5.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^5.0.3",
|
|
"@types/jest": "^30.0.0",
|
|
"@types/node": "^24.0.10",
|
|
"@types/node-cron": "^3.0.11",
|
|
"@types/sqlite3": "^3.1.11",
|
|
"@types/supertest": "^6.0.3",
|
|
"@types/swagger-jsdoc": "^6.0.4",
|
|
"@types/swagger-ui-express": "^4.1.8",
|
|
"concurrently": "^9.2.0",
|
|
"jest": "^29.7.0",
|
|
"jest-environment-node": "^30.0.4",
|
|
"nodemon": "^3.1.10",
|
|
"sass": "^1.89.2",
|
|
"supertest": "^6.3.4",
|
|
"ts-jest": "^29.4.0",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.8.3"
|
|
},
|
|
"keywords": [
|
|
"ice",
|
|
"winter",
|
|
"road conditions",
|
|
"michigan",
|
|
"great lakes",
|
|
"weather",
|
|
"tracking",
|
|
"map"
|
|
],
|
|
"author": "Your Name",
|
|
"license": "MIT"
|
|
}
|