Files
CollabTable/shared/media-backend/SECURITY_AUDIT.md
T
Gabriel20xx fd32419371
Docker / Docker Build & Push (push) Successful in 3m34s
Sync shared snapshot from 43d77dd
2026-09-01 08:44:09 +02:00

1.1 KiB

MediaCollection security notes

The backend rewrite consolidates the security boundary in internal/.

Implemented controls include:

  • bcrypt passwords, PostgreSQL cookie sessions, TOTP verification, role checks, and disabled-user checks;
  • explicit CORS and WebSocket origin validation, security headers, and bounded request bodies;
  • additive PostgreSQL migrations with a startup advisory lock;
  • traversal, absolute-path, drive-path, and symlink-escape protection for every configured media root;
  • fixed ffmpeg argument construction and bounded workflow workers;
  • HTTPS-only downloader URLs with credential, private-IP, link-local, metadata-host, and DNS-rebinding checks;
  • internal-service secret checks for mount, download, reload, upload, and catalog mutation routes;
  • non-root Docker images and no Node server runtime.

Before deployment, set a unique INTERNAL_SERVICE_SECRET, use a strong database password, configure CORS_ORIGIN to the real frontend origin, and enable TLS so COOKIE_SECURE can remain enabled. Review the canonical Go routes when adding a capability; do not reintroduce the removed JavaScript server paths or Socket.IO transport.