release: MUA 2026.11.20.r036
Read-only shell - Accept a full command line (`command`) and parse it without /bin/sh: quotes, escapes, ~, pipes between allowed programs, ; && ||, globs in absolute paths; 2>&1 and 2>/dev/null are tolerated. Pipeline stages run with strictly single-quoted, pre-validated literals only. - Per-program option policies that understand combined short flags, --opt=value and GNU abbreviations. Closes bypasses: ip abbreviations (ip a a / ip r d / ip link s), dmesg -c/-Tc/--console-level=, ss -tK/-D, date operands, sort -o, uniq output file, file -C. - Block credential files (shadow, SSH private keys, mua.conf, admin token, /proc/*/environ, docker config.v2.json); redact password hashes, private PEM keys and WireGuard keys in output. MUA API key and admin token are never emitted by any tool. - More diagnostic programs (echo, printf, sort, uniq, cut, tr, findmnt, sensors, zpool/zfs read verbs, mdcmd status, ...). grep without matches is reported as no_match instead of an error. Process handling - Spawn every child in its own process group; timeouts kill the whole tree. The MCP hard timeout kills exactly the processes of that call. - Async jobs: command in its own file (exit no longer loses the exit code), new unraid_system_job_cancel, finished jobs pruned after 7 days. Other - Cache toolbox discovery briefly; validate and bound session IDs; /health shows version/port only with a valid token; constant-time admin token check; auto-granted tools are logged and shown in the WebGUI. - Remove the legacy PHP server (mcp/), drop old packages from dist/, pin @types/bun. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1df7f9f1c
commit
b8d89ffd9c
23 files changed
+1460
-1470
No files matched your search
+12
-10
@@ -41,7 +41,7 @@ class ReleaseTests(unittest.TestCase):
|
||||
self.assertRegex(current, r"^\d{4}\.\d{2}\.\d{2}\.r\d{3}$")
|
||||
self.assertEqual(manifest().attrib["version"], current)
|
||||
self.assertEqual(json.loads((ROOT / "plugin/plugin.json").read_text())["version"], current)
|
||||
for path in ("src/helpers.ts", "mcp/server.php", "mcp/helpers.php"):
|
||||
for path in ("src/helpers.ts",):
|
||||
with self.subTest(path=path):
|
||||
declared = re.search(r'MUA_VERSION\s*=\s*[\'\"]([^\'\"]+)', (ROOT / path).read_text())
|
||||
self.assertIsNotNone(declared)
|
||||
@@ -107,15 +107,17 @@ class ReleaseTests(unittest.TestCase):
|
||||
result = subprocess.run(["bash", "-n"], input=node.text, text=True, capture_output=True)
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
|
||||
def test_r033_archive_is_not_overwritten(self):
|
||||
archive = ROOT / "dist/mua-2026.11.01.r033-x86_64-1.txz"
|
||||
self.assertEqual(hashlib.sha256(archive.read_bytes()).hexdigest(),
|
||||
"ee85aa33230dbb6fe561f8c0000cb854bd542b0da5ad6c1a9100320fc2d5267f")
|
||||
|
||||
def test_r034_archive_is_not_overwritten(self):
|
||||
archive = ROOT / "dist/mua-2026.11.05.r034-x86_64-1.txz"
|
||||
self.assertEqual(hashlib.sha256(archive.read_bytes()).hexdigest(),
|
||||
"ed6f1f52474711ac87aba9dd53d3f920c9701373bafc7eeff868ef9a839100ed")
|
||||
def test_dist_holds_only_the_current_release(self):
|
||||
# Older packages stay available in git history; keeping only the
|
||||
# current one in the tree keeps checkouts small (each is ~24 MB).
|
||||
tracked = subprocess.run(["git", "ls-files", "dist"], cwd=ROOT, text=True,
|
||||
capture_output=True, check=True).stdout.split()
|
||||
name = f"dist/mua-{version()}-x86_64-1.txz"
|
||||
self.assertEqual(sorted(tracked), [name, name + ".sha256"])
|
||||
payload = next(node for node in manifest().findall("FILE") if node.find("URL") is not None)
|
||||
digest = hashlib.sha256((ROOT / name).read_bytes()).hexdigest()
|
||||
self.assertEqual(digest, payload.findtext("SHA256"))
|
||||
self.assertEqual((ROOT / (name + ".sha256")).read_text().split()[0], digest)
|
||||
|
||||
@unittest.skipUnless(os.environ.get("MUA_RELEASE_ARCHIVE"), "set MUA_RELEASE_ARCHIVE after building")
|
||||
def test_built_archive_matches_manifest_and_expected_files(self):
|
||||
|
||||
Reference in new issue
Block a user