gorkem-bwl
88b68a9df0
fix: apply prettier formatting to app.js
...
Fixed formatting issues to pass CI/CD checks
2025-08-11 17:39:08 -04:00
gorkem-bwl
8b322a0ec0
feat: apply input sanitization to prevent XSS attacks
...
Enables comprehensive XSS protection by applying sanitization middleware
to all incoming requests. Uses the sanitization utilities added in previous PR.
Changes:
- Added sanitizeBody() and sanitizeQuery() middleware after express.json()
- Enhanced Content Security Policy headers for additional XSS protection
- Added 'object-src: none' and 'base-uri: self' directives
- All user inputs now automatically sanitized before processing
Security improvements:
- Prevents stored XSS attacks through HTML sanitization
- Recursive sanitization handles nested objects and arrays
- Maintains backward compatibility with existing functionality
- Strengthened CSP headers block unsafe content injection
Files changed: src/app.js (9 lines added)
Risk level: Medium (global middleware application)
2025-08-11 17:33:05 -04:00
gorkem-bwl
7968ed8a19
fix: apply prettier formatting to sanitization.js
...
Fixed formatting issues identified by CI/CD system
2025-08-11 17:26:28 -04:00
gorkem-bwl
2fba22d0f6
feat: add input sanitization infrastructure
...
Adds foundational utilities for XSS prevention without applying them yet.
This prepares the codebase for comprehensive input sanitization in a follow-up PR.
Changes:
- Added isomorphic-dompurify and jsdom dependencies
- Created sanitization utilities in src/utils/sanitization.js
- Includes recursive object sanitization functions
- Provides Express middleware for body and query sanitization
Infrastructure only - no behavioral changes yet.
Files added:
- src/utils/sanitization.js (sanitization utilities)
- package.json (new dependencies)
Next steps:
- Apply sanitization middleware in follow-up PR
- Enable XSS protection across application
2025-08-11 17:23:14 -04:00
Dr. Gorkem Cetin
07e82edab7
GITBOOK-23: No subject
2024-10-11 02:46:44 +00:00
Dr. Gorkem Cetin
ba0a19d5fe
GITBOOK-22: No subject
2024-10-11 02:44:26 +00:00
Dr. Gorkem Cetin
88590301c0
GITBOOK-21: No subject
2024-10-11 02:36:23 +00:00
Dr. Gorkem Cetin
7833315fa4
GitBook: No commit message
2024-10-09 23:53:18 +00:00
Dr. Gorkem Cetin
86bed1b3b2
GITBOOK-20: No subject
2024-10-09 04:10:02 +00:00
Dr. Gorkem Cetin
bde789dc59
GITBOOK-20: No subject
2024-10-09 04:06:51 +00:00
Dr. Gorkem Cetin
308e884b36
GITBOOK-20: No subject
2024-10-04 16:22:25 +00:00
Dr. Gorkem Cetin
bdeb33b8d3
GITBOOK-19: No subject
2024-10-04 16:14:18 +00:00
Dr. Gorkem Cetin
a9a34f8725
GITBOOK-18: No subject
2024-10-04 13:35:14 +00:00
Dr. Gorkem Cetin
f7a3172251
GITBOOK-16: No subject
2024-10-04 13:20:04 +00:00
Dr. Gorkem Cetin
9dc3fe3a27
GITBOOK-15: No subject
2024-10-04 13:16:34 +00:00
Dr. Gorkem Cetin
dbda203ba3
GITBOOK-13: No subject
2024-10-04 05:18:17 +00:00
Dr. Gorkem Cetin
35ae579509
GITBOOK-12: No subject
2024-10-04 05:13:57 +00:00