@1agh/maude 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/apps/studio/http.ts
CHANGED
|
@@ -6157,6 +6157,10 @@ export function createHttp(
|
|
|
6157
6157
|
}
|
|
6158
6158
|
|
|
6159
6159
|
// Fall-through: serve user repo files (designRoot + everything under repoRoot).
|
|
6160
|
+
// DNS rebinding (Phase 2 gate): a rebound page talks to this port with its own
|
|
6161
|
+
// name in Host, and this lane serves `/.env`, `/.git/config`, `/.ai/**` — the same
|
|
6162
|
+
// loopback-or-vouched-cell check the API routes use (`isTrustedRequestHost`).
|
|
6163
|
+
if (!isTrustedRequestHost(req)) return new Response('Forbidden', { status: 403 });
|
|
6160
6164
|
const fp = safePathUnderRoot(req.url, ctx.paths.repoRoot);
|
|
6161
6165
|
if (!fp) return new Response('Forbidden', { status: 403 });
|
|
6162
6166
|
|
package/apps/studio/server.ts
CHANGED
|
@@ -427,6 +427,13 @@ function startServer(port: number): BunServer {
|
|
|
427
427
|
status: 403,
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
+
// CSWSH (Phase 2 gate): a WS handshake bypasses SOP and every page in the
|
|
431
|
+
// browser sends a loopback Host to ws://localhost, so on a desktop a drive-by
|
|
432
|
+
// site could open this realm-'main' (ungated) socket. Same check as /_ws/acp.
|
|
433
|
+
// Not in a cell: the proxy authenticates and rewrites Host (D4).
|
|
434
|
+
if (!WORKSPACE && !isSameOriginWs(req)) {
|
|
435
|
+
return new Response('collab is same-origin only', { status: 403 });
|
|
436
|
+
}
|
|
430
437
|
const ok = srv.upgrade(req, {
|
|
431
438
|
data: {
|
|
432
439
|
id: crypto.randomUUID(),
|
|
@@ -476,6 +483,11 @@ function startServer(port: number): BunServer {
|
|
|
476
483
|
|
|
477
484
|
// Legacy inspector WS — JSON frames, designer-facing live tab state.
|
|
478
485
|
if (pathname.startsWith('/_ws')) {
|
|
486
|
+
// CSWSH (Phase 2 gate) — the shell's own socket; a drive-by Origin is refused
|
|
487
|
+
// on a desktop like /_ws/acp and collab above (a cell's proxy vouches instead).
|
|
488
|
+
if (!WORKSPACE && !isSameOriginWs(req)) {
|
|
489
|
+
return new Response('inspector is same-origin only', { status: 403 });
|
|
490
|
+
}
|
|
479
491
|
const ok = srv.upgrade(req, {
|
|
480
492
|
data: {
|
|
481
493
|
id: crypto.randomUUID(),
|
|
@@ -631,6 +643,12 @@ function startCanvasServer(
|
|
|
631
643
|
if (!isLoopbackHost(req.headers.get('host')) && !vouchedRole) {
|
|
632
644
|
return new Response('cross-machine collab requires Phase 9 hub deploy', { status: 403 });
|
|
633
645
|
}
|
|
646
|
+
// CSWSH (Phase 2 gate) — the canvas iframe keeps its own origin
|
|
647
|
+
// (`allow-same-origin`), so only a page ON this canvas origin passes; a drive-by
|
|
648
|
+
// site could otherwise read the Y-doc and write comments/annotations here.
|
|
649
|
+
if (!WORKSPACE && !isSameOriginWs(req)) {
|
|
650
|
+
return new Response('collab is same-origin only', { status: 403 });
|
|
651
|
+
}
|
|
634
652
|
const ok = srv.upgrade(req, {
|
|
635
653
|
data: {
|
|
636
654
|
id: crypto.randomUUID(),
|
|
@@ -653,8 +671,12 @@ function startCanvasServer(
|
|
|
653
671
|
}
|
|
654
672
|
|
|
655
673
|
// HMR-only socket — canvas iframes listen for `canvas-hmr` here. Carries
|
|
656
|
-
// NO privileged inspector feed and ignores inbound messages (ws.ts)
|
|
674
|
+
// NO privileged inspector feed and ignores inbound messages (ws.ts) — but its
|
|
675
|
+
// frames name files (→ collab slugs), so a drive-by Origin is refused too.
|
|
657
676
|
if (pathname.startsWith('/_ws')) {
|
|
677
|
+
if (!WORKSPACE && !isSameOriginWs(req)) {
|
|
678
|
+
return new Response('canvas socket is same-origin only', { status: 403 });
|
|
679
|
+
}
|
|
658
680
|
const ok = srv.upgrade(req, {
|
|
659
681
|
data: {
|
|
660
682
|
id: crypto.randomUUID(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agh/maude",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"test:e2e:desktop:parity:cloud": "pnpm --filter @maude/desktop-e2e e2e:parity:cloud"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@1agh/maude-darwin-arm64": "1.9.
|
|
62
|
-
"@1agh/maude-darwin-x64": "1.9.
|
|
63
|
-
"@1agh/maude-linux-arm64": "1.9.
|
|
64
|
-
"@1agh/maude-linux-arm64-musl": "1.9.
|
|
65
|
-
"@1agh/maude-linux-x64": "1.9.
|
|
66
|
-
"@1agh/maude-linux-x64-musl": "1.9.
|
|
67
|
-
"@1agh/maude-win32-x64": "1.9.
|
|
61
|
+
"@1agh/maude-darwin-arm64": "1.9.1",
|
|
62
|
+
"@1agh/maude-darwin-x64": "1.9.1",
|
|
63
|
+
"@1agh/maude-linux-arm64": "1.9.1",
|
|
64
|
+
"@1agh/maude-linux-arm64-musl": "1.9.1",
|
|
65
|
+
"@1agh/maude-linux-x64": "1.9.1",
|
|
66
|
+
"@1agh/maude-linux-x64-musl": "1.9.1",
|
|
67
|
+
"@1agh/maude-win32-x64": "1.9.1"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"cli",
|