Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(security): keep remote-authority test shell path trusted

Rahman60c0fba61afa
diff --git a/scripts/update-remote-authority.test.ts b/scripts/update-remote-authority.test.ts
index 101f6b3a..1f4f25b8 100644
--- a/scripts/update-remote-authority.test.ts
+++ b/scripts/update-remote-authority.test.ts
@@ -4,7 +4,7 @@ import os from "node:os";
import path from "node:path";
import { afterEach, describe, expect, it } from "vitest";
-const HELPER = path.join(process.cwd(), "scripts/lib/update-remote-authority.sh");
+const HELPER = new URL("./lib/update-remote-authority.sh", import.meta.url);
const roots: string[] = [];
function git(cwd: string, ...args: string[]) {
@@ -20,7 +20,7 @@ function repo(origin: string) {
}
function prepare(root: string) {
- execFileSync("bash", ["-c", 'source "$1"; update_prepare_origin "$2"', "_", HELPER, root], { encoding: "utf8" });
+ execFileSync("bash", ["-c", 'source "./lib/update-remote-authority.sh"; update_prepare_origin "$1"', "_", root], { cwd: new URL(".", import.meta.url), encoding: "utf8" });
return git(root, "remote", "get-url", "origin");
}