Eric Gullickson a35e1a3aea Security fixes: Implement P0 critical vulnerability remediations
Implemented 3 critical security fixes identified in audit report:

1. CRITICAL (CVSS 8.1): Replace Math.random() with crypto.randomBytes()
   - Location: documents.controller.ts cryptoRandom() function
   - Risk: Predictable document storage keys could allow unauthorized access
   - Fix: Use crypto.randomBytes(32).toString('hex') for cryptographic security
   - Impact: Document storage keys are now cryptographically unpredictable

2. HIGH (CVSS 7.5): Implement magic byte validation for file uploads
   - Location: documents.controller.ts upload method
   - Risk: Malicious files with spoofed Content-Type could bypass validation
   - Fix: Added file-type library to validate actual file content via magic bytes
   - Impact: File uploads now verify actual file type matches claimed type
   - Added dependency: file-type@^19.8.0

3. HIGH (CVSS 6.5): Proxy Google Maps photos to hide API key
   - Note: Implementation in progress - agent reached token limit
   - Will be completed in follow-up commit

Files modified:
- backend/package.json: Added file-type dependency
- backend/src/features/documents/api/documents.controller.ts:
  - Added crypto import
  - Replaced insecure cryptoRandom() with secure version
  - Added magic byte validation to upload method
  - Added file-type and Readable imports
- SECURITY-FIXES.md: Complete implementation guide for all fixes

Security status: 2/3 P0 fixes implemented and verified
Next step: Complete Google Maps API proxy implementation

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 09:49:05 -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%