Require operator authority for Music Video ffmpeg render dispatch
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Audit slice: uploaded media reaching ffmpeg, and the routes that dispatch ffmpeg renders (security audit, 2026-10-20).
Problem
Five Music Video routes start an ffmpeg render or encode job on the host and are not in HOST_CONTROL_ROUTES (server/lib/hostControlRoutes.js):
| Route | Handler | ffmpeg sink |
|---|---|---|
POST /api/music-video/:id/render |
server/routes/musicVideo.js:714 |
services/musicVideo/render.js (final render, spawn) |
POST /api/music-video/:id/shots/:sceneId/render |
server/routes/musicVideo.js:740 |
services/musicVideo/shotSegments.js:307 (runFfmpegProcess) |
POST /api/music-video/:id/shot-renders/preview |
server/routes/musicVideo.js:750 |
services/musicVideo/shotSegments.js:400 (concat with the song) |
POST /api/music-video/:id/excerpt |
server/routes/musicVideo.js:1033 |
services/musicVideo/excerptRender.js:413 (spawn) |
POST /api/music-video/:id/publish-kit/build |
server/routes/musicVideo.js:1041 |
services/musicVideo/publishKit.js:189,200 (platform encodes, thumbnails) |
The sibling ffmpeg render dispatches are already gated as host control: video stitch and upscale (#11076, hostControlRoutes.js:621-623), trim-start (#11418, :624-625) and the Video Timeline render (#11432, :626-627). The file's own criterion is that a route belongs in the list when it runs a process on the host.
Impact: on a password-free install any LAN or tailnet caller, and any scoped peer credential, can start these long ffmpeg jobs over the project's master audio and clips. The master audio is whatever was uploaded through the ungated track or vocal-stem upload. The same audit fixed the worst consequence of that combination at ingest: ffmpeg 4.4 and 5.1 (Ubuntu 22.04, Debian 12) opened an uploaded .mp3 that was really an HLS playlist and read the local media file it named into the render. Ingest now refuses such files (detectMediaManifest, server/lib/mimeTypes.js). What remains is unauthorized host process execution, the same class #11432 closed for the timeline. Severity 2.
Decided fix
Add the five routes above to HOST_CONTROL_ROUTES in a "Music Video ffmpeg renders" block beside the #11432 timeline entry, with a one-line comment naming the ffmpeg sink. These stay open:
- the cancel routes, because they reduce execution
GETstatus and SSE event routesPOST /:id/render-cleanup, which deletes PortOS's own render cachesPOST /:id/analyze, which is a bounded ingest decode like the upload thumbnail and duration probes
Autonomous production runs call renderMusicVideo and startShotRender in-process from routes that are already gated, so they are unaffected. Local operators, signed-in sessions and agents with PORTOS_API_TOKEN keep every render.
Acceptance criteria
server/routes/hostControlMediaProcessing.test.js(or a newhostControlMusicVideoRender.test.jsin the same shape) proves all five routes are refused for a remote caller on a password-free install and for a peer credential, and are still dispatched for a local connection and an operator/agent session.docs/API.mdnotes the gate where it documents these routes.
Scope: small. model:light because it is a list edit plus a test file that copies an existing pattern. effort:low because the route set is decided here.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 35m
- Merged PRs (30d)
- 993
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
bug effort:medium model:light tests
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
area:cos-agents bug effort:low model:light plan planner:sonnet-5-5
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:federation bug effort:medium model:light plan planner:sonnet-5-5
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
musicVideoSceneHooks test can leak its temp root past afterAll and fail the suite's temp-leak guardOpenbug effort:medium model:light plan planner:sonnet-5-5 tests
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
area:cos-agents bug effort:high model:medium plan planner:sonnet-5-5
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
routine:ci-review
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
harlan-zw/unlighthouse#456 · 1 comment ·
Maintainers usually reply within 1 day
-
beginner enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
philaconvalley/website#217 ·
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-webui/open-webui#32896 · 2 comments ·
Maintainers usually reply within 1 day
-
⚠ needs intervention document not found
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenTermsArchive/contrib-declarations#4151 ·
Maintainers usually reply within 1 day
-
correction via-web
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ch-bas/cctv-camera-database#416 ·
Maintainers usually reply within 1 day