Files
CollabTable/shared/media-backend/SECURITY_AUDIT.md
T
Gabriel20xxandClaude Sonnet 5 bbf5d8bb05
Lint / Lint (push) Successful in 1m5s
Tests / Go backend (push) Successful in 46s
Docker / Docker Build & Push (push) Failing after 2m1s
Tests / Dashboard checks (push) Successful in 49s
Add self-info endpoint for ProjectConfigurator discovery, sync shared updates
GET /api/info reports name/tabs/mount types (empty - state lives in Postgres,
no shared file mounts) so ProjectConfigurator's Projects workspace can
register this instance from just a URL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 15:07:02 +02:00

1.1 KiB

Shared media backend 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.