Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(security): require operator authority for local music generation (#11077)

Adam Eivy60d9a160bb70
diff --git a/server/lib/hostControlRoutes.js b/server/lib/hostControlRoutes.js
index ac055413e8..2fbc2f7880 100644
--- a/server/lib/hostControlRoutes.js
+++ b/server/lib/hostControlRoutes.js
@@ -454,6 +454,8 @@ export const HOST_CONTROL_ROUTES = Object.freeze([
'POST /api/music/lyrics',
'POST /api/music/waveform',
'POST /api/music/code',
+ // Local music generation spawns neural-audio Python on the host (#11077).
+ 'POST /api/music/generate',
'POST /api/tracks/:id/waveform/draw',
'POST /api/music-video/autonomous',
'POST /api/music-video/:id/autonomous/resume',
diff --git a/server/lib/hostControlRoutes.test.js b/server/lib/hostControlRoutes.test.js
index 5d3d409596..f5f93eb394 100644
--- a/server/lib/hostControlRoutes.test.js
+++ b/server/lib/hostControlRoutes.test.js
@@ -789,6 +789,27 @@ describe('Calendar MCP execution policy (#11051)', () => {
});
});
+describe('Local music generation policy (#11077)', () => {
+ const protectedRoutes = [
+ 'POST /api/music/generate',
+ ];
+
+ it('gates each route and maps every entry to a mounted route', () => {
+ const mounted = new Set(getApiRouteCatalog().routes.map(({ method, path }) => method + ' ' + path));
+ for (const route of protectedRoutes) {
+ const [method, path] = route.split(' ');
+ expect(mounted.has(route), route).toBe(true);
+ expect(hostControlRouteFor(method, path), route).toBe(route);
+ }
+ });
+
+ it('keeps reads open', () => {
+ for (const [method, path] of [
+ ['GET', '/api/music/models/:engine'],
+ ]) expect(isHostControlRoute(method, path), `${method} ${path}`).toBe(false);
+ });
+});
+
describe('Importer, Brain and analytics AI policy (#11036)', () => {
const protectedRoutes = [
'POST /api/importer/classify',