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 3D model generation (#11075)

Adam Eivy0ebaf4d3c8cd
diff --git a/server/lib/hostControlRoutes.js b/server/lib/hostControlRoutes.js
index ac055413e8..3a99025250 100644
--- a/server/lib/hostControlRoutes.js
+++ b/server/lib/hostControlRoutes.js
@@ -441,6 +441,9 @@ export const HOST_CONTROL_ROUTES = Object.freeze([
// stay open.
'POST /api/image-to-3d/targets/:targetId/install',
'POST /api/image-to-3d/trellis2/install',
+ // 3D generation and re-generation run host Python/GPU adapters (#11075).
+ 'POST /api/image-to-3d/models',
+ 'POST /api/image-to-3d/models/:id/generate',
'POST /api/midi-runtime/install',
'POST /api/devtools/video-download/yt-dlp/update',
diff --git a/server/lib/hostControlRoutes.test.js b/server/lib/hostControlRoutes.test.js
index 5d3d409596..1849cd7c7e 100644
--- a/server/lib/hostControlRoutes.test.js
+++ b/server/lib/hostControlRoutes.test.js
@@ -740,6 +740,29 @@ describe('3D model rigging host-workers (#10922)', () => {
});
});
+describe('3D model generation policy (#11075)', () => {
+ const protectedRoutes = [
+ 'POST /api/image-to-3d/models',
+ 'POST /api/image-to-3d/models/:id/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/image-to-3d/models'],
+ ['GET', '/api/image-to-3d/models/:id'],
+ ]) expect(isHostControlRoute(method, path), `${method} ${path}`).toBe(false);
+ });
+});
+
describe('Remote desktop session policy (#10923)', () => {
const protectedRoutes = [
'POST /api/remote-desktop/sessions',