Eric Gullickson 183d55b0fe Security fix: Implement magic byte validation for file uploads (Fix 2)
Fixed HIGH severity security vulnerability (CVSS 7.5) where file upload
validation relied solely on Content-Type headers, allowing malicious
files with spoofed MIME types to bypass validation.

Changes:
- Updated file-type dependency to v16.5.4 (last CommonJS version)
- Added magic byte (file signature) validation using fileTypeFromBuffer
- Read first 4100 bytes of upload to detect actual file type
- Verify detected type matches claimed Content-Type header
- Reject files where content doesn't match headers
- Enhanced logging with detected_type for audit trail

Security impact:
- Prevents .exe files renamed to .pdf from being uploaded
- Prevents Content-Type header spoofing attacks
- Validates file content at binary level, not just metadata

Status: Fix 2 complete
- Fix 1: crypto.randomBytes() ✓
- Fix 2: Magic byte validation ✓
- Fix 3: Google Maps API proxy ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 10:06:53 -06:00
2025-11-01 21:27:42 -05:00
2025-11-03 14:06:54 -06:00
2025-10-10 23:26:07 -05:00
2025-11-03 16:12:29 -06:00
2025-11-07 13:51:47 -06:00
2025-11-01 21:27:42 -05:00
2025-11-04 18:38:06 -06:00
2025-11-08 15:34:29 -06:00
2025-11-08 12:17:29 -06:00
2025-11-05 11:04:48 -06:00
2025-08-09 17:45:54 -05:00
2025-11-05 19:04:06 -06:00
2025-11-05 19:04:06 -06:00
2025-11-04 18:38:06 -06:00

MotoVaultPro — Simplified Architecture

Simplified 5-container architecture with integrated platform feature.

Requirements

  • Mobile + Desktop: Implement and test every feature on both.
  • Docker-first, production-only: All testing and validation in containers.
  • See CLAUDE.md for development partnership guidelines.

Quick Start (containers)

make setup    # build + start + migrate (uses mvp-* containers)
make start    # start 5 services
make rebuild  # rebuild on changes
make logs     # tail all logs
make migrate  # run DB migrations

Documentation

  • AI quickload: AI-INDEX.md
  • Docs hub: docs/README.md
  • Features: backend/src/features/{name}/README.md
  • Frontend: frontend/README.md
  • Backend core: backend/src/core/README.md

URLs and Hosts

  • Frontend: https://motovaultpro.com
  • Backend health: https://motovaultpro.com/api/health
Description
No description provided
Readme 90 MiB
Languages
TypeScript 80.5%
Python 15%
Shell 2.3%
PLpgSQL 1.3%
JavaScript 0.4%
Other 0.4%