Fix media-backend/media-webui: re-copy from post-revert MediaCollection

The original MediaEngine extraction (later folded into this repo) had
been done BEFORE the owner's decision to revert the MediaViewer/Forge/
etc. rename, and was never re-extracted afterward like the other 7
service repos were - it silently carried stale renamed-era text
(e.g. 'Porter' instead of 'MediaServant') into Go doc comments, WebUI
prose, project-icons.json, and app-config.ts. Re-copied both directories
fresh from the current (correctly reverted) MediaCollection/backend and
MediaCollection/WebUI, then re-applied the go.mod replace-directive fix
and re-added SECURITY_AUDIT.md (also newly migrated from MediaCollection
root - a real deployment security checklist that would otherwise have
been lost when MediaCollection is deleted).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-08-31 22:19:58 +02:00
1 parent acde180086
commit 38a349eb52
20 files changed
+74 -55

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
# 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.