Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ web_modules/
# Optional npm cache directory
.npm

# package-lock.json (project uses pnpm)
package-lock.json

# Optional eslint cache
.eslintcache

Expand Down
39 changes: 39 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Security Vulnerability Assessment Summary

## Overview
This security assessment identified and addressed all critical vulnerabilities in the CV application.

## Vulnerabilities Fixed

### 1. Cross-Site Scripting (XSS) - HIGH SEVERITY ✅ FIXED
**Issue**: Unsanitized HTML output from Showdown markdown converter
- Malicious markdown could execute arbitrary JavaScript

**Fix**:
- Added `isomorphic-dompurify` for HTML sanitization
- Configured strict allowlist for safe HTML tags and attributes
- All markdown output is now sanitized before rendering

### 2. Missing Subresource Integrity (SRI) - MEDIUM SEVERITY ✅ FIXED
**Issue**: External script loaded from CDN without integrity check

**Fix**:
- Added SHA-384 integrity hash to html2pdf.js script tag
- Added crossorigin attribute for proper CORS handling

### 3. YAML Injection - NOT VULNERABLE ✅ VERIFIED
**Finding**: js-yaml v4+ uses safe loading by default - no action needed

## Security Analysis Results

- ✅ npm audit: 0 vulnerabilities
- ✅ CodeQL analysis: 0 alerts
- ✅ No hardcoded credentials
- ✅ TypeScript strict mode enabled

## Recommendations

1. Keep dependencies updated regularly
2. Run `npm audit` before deployments
3. Ensure HTTPS in production
4. Consider adding Content-Security-Policy headers
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "ISC",
"dependencies": {
"date-fns": "^4.1.0",
"isomorphic-dompurify": "^3.0.0-rc.2",
"js-yaml": "^4.1.0",
"showdown": "^2.1.0"
},
Expand Down
Loading