Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Verify saved MCP installers before executing them
pulse-triage[bot]b64cce9666c0
diff --git a/cmd/pulse-mcp/README.md b/cmd/pulse-mcp/README.mdindex dd4f936303..219031eefb 100644--- a/cmd/pulse-mcp/README.md+++ b/cmd/pulse-mcp/README.md@@ -43,25 +43,24 @@ manifest tools and resource URIs, not a separate MCP playbook layer.## Install-Three ways to get the binary, in order of friction.+Install the adapter on the machine running your MCP client, not on every+monitored host. Installation needs no Pulse token.-### 1. One-line installer (recommended)+### 1. Verified, saved installer (recommended)-```sh-curl -fsSL https://github.com/rcourtman/Pulse/releases/latest/download/install-mcp.sh | bash-```+Follow the [saved-installer verification steps](../../docs/AGENT_SUBSTRATE.md#install-the-mcp-adapter-safely)+for Unix or Windows. They download one published release's installer to a new+directory and verify the release and exact saved asset before you review or+execute it. Do not pipe a remote script into Bash or PowerShell.-Detects your platform, downloads the matching binary from the latest-Pulse release, verifies SHA256, and places it at `~/.local/bin/pulse-mcp`+The installer detects your platform, verifies Pulse's signed checksum manifest+and the matching binary's SHA256, and places it at `~/.local/bin/pulse-mcp`(or `/usr/local/bin/pulse-mcp` if `~/.local/bin` is not writable).Override the install location with `PULSE_MCP_BIN_DIR=/some/path` or-the version with `PULSE_MCP_VERSION=v6.0.0-rc.5`.--Windows (PowerShell):--```powershell-irm https://github.com/rcourtman/Pulse/releases/latest/download/install-mcp.ps1 | iex-```+pin the exact published tag with `PULSE_MCP_VERSION=vX.Y.Z` (PowerShell:+`-Version vX.Y.Z`). Without that pin it downloads the latest release, which+need not be the release whose installer you just verified. Windows installs+to `%LOCALAPPDATA%\pulse-mcp` by default. Keep OS security controls enabled.### 2. Download from a GitHub Release@@ -72,15 +71,16 @@ Pick the binary that matches your platform from the Pulse release assets:- `pulse-mcp-windows-amd64.exe` for Windows- (full matrix on the release page)-`chmod +x` it on Unix, drop it on your `PATH`. SHA256 sums for every-binary are in `checksums.txt` on the same release.+Save it without running it. Use the same release and asset verification steps+above, substituting the exact binary filename for the installer. A SHA256+match against an unauthenticated `checksums.txt` alone is not verification.+Only after verification, `chmod +x` it on Unix and put it on your `PATH`.-On macOS the first launch may show a Gatekeeper warning ("cannot be-opened because the developer cannot be verified"). Either right-click-the binary and pick Open the first time, or run-`xattr -d com.apple.quarantine pulse-mcp` to clear the quarantine flag.-Notarization is intentionally skipped for v1; the install-script path-above downloads the same unsigned binary.+If macOS Gatekeeper, Windows policy or another security control blocks launch,+keep the warning and use your administrator's normal software approval path.+Pulse's detached release signature is not macOS notarization or Windows+Authenticode; do not remove quarantine or weaken execution policy as a+troubleshooting shortcut.### 3. Build from sourcediff --git a/docs/AGENT_SUBSTRATE.md b/docs/AGENT_SUBSTRATE.mdindex 47afb3cec5..db8aed11a5 100644--- a/docs/AGENT_SUBSTRATE.md+++ b/docs/AGENT_SUBSTRATE.md@@ -15,6 +15,69 @@ monitoring or act on workloads. A tool listing or readiness badge is not anexecution grant or proof of recovery. Use only a client and model providerpermitted to receive the data in those responses.+## Install the MCP adapter safely++Install `pulse-mcp` on the machine running your MCP client, not on every+monitored host. It needs no Pulse token to install. Choose one **published+Pulse release tag**, not a Helm-chart tag or a development branch, and keep+that tag for both the installer and the binary it downloads.++Do not pipe a remote download into Bash or PowerShell. The installers verify+the binary against Pulse's signed checksum manifest, but that check runs+**inside the installer**: it cannot authenticate an unverified installer that+you have already executed. With GitHub CLI **2.97.0 or newer**, save and verify+the installer first. These download-only recipes use a new directory, never+overwrite an existing file, and stop if a download or verification fails.++On Linux, macOS or FreeBSD, replace `vX.Y.Z` with your chosen published tag:++```sh+(+ set -eu+ version=vX.Y.Z+ download_dir=$(mktemp -d)+ gh release download "$version" --repo rcourtman/Pulse \+ --pattern install-mcp.sh --dir "$download_dir"+ gh release verify "$version" --repo rcourtman/Pulse+ gh release verify-asset "$version" "$download_dir/install-mcp.sh" --repo rcourtman/Pulse+ printf 'Verified installer saved in %s\n' "$download_dir"+)+```++On Windows, use PowerShell. Native command failures need explicit checks even+when `$ErrorActionPreference` is `Stop`:++```powershell+$version = 'vX.Y.Z'+$downloadDir = Join-Path ([System.IO.Path]::GetTempPath()) ('pulse-mcp-' + [guid]::NewGuid())+New-Item -ItemType Directory -Path $downloadDir -ErrorAction Stop | Out-Null+gh release download $version --repo rcourtman/Pulse --pattern install-mcp.ps1 --dir $downloadDir+if ($LASTEXITCODE -ne 0) { throw 'Installer download failed; stop here.' }+gh release verify $version --repo rcourtman/Pulse+if ($LASTEXITCODE -ne 0) { throw 'Release verification failed; stop here.' }+gh release verify-asset $version (Join-Path $downloadDir 'install-mcp.ps1') --repo rcourtman/Pulse+if ($LASTEXITCODE -ne 0) { throw 'Installer verification failed; stop here.' }+Write-Output "Verified installer saved in $downloadDir"+```++Review the saved script locally **after verification and before running it**.+If any check fails or your CLI lacks a verification command, stop; do not use+a checksum from the same unverified download as a substitute, skip signature+checks, or fall back to executing a remote script. See+[release build provenance](INSTALL.md#verify-release-build-provenance) for the+separate build evidence and offline-verification requirements.++Only after successful verification and review, run that saved script as your+normal client user. For Unix, use `PULSE_MCP_VERSION=vX.Y.Z bash /path/to/install-mcp.sh`;+for Windows, use `& (Join-Path $downloadDir 'install-mcp.ps1') -Version $version`+in the same session. Keep the exact chosen tag; otherwise the installer defaults+to the latest release. Do not add `sudo`, weaken PowerShell execution policy,+remove macOS quarantine or bypass an operating-system warning to make it run.+Use your administrator's normal software approval path if it is blocked.+The installer also needs OpenSSH's `ssh-keygen` and refuses missing or invalid+signature evidence. Installation success is not a successful Pulse connection;+continue with the read-only setup below.+## Connect without granting control1. Inspect the manifest on the running server, not just this page. Its@@ -162,11 +225,12 @@ Pulse; verification can be unavailable without proving that nothing ran.`--emit-notifications` to translate Pulse's SSE events into JSON-RPCnotifications on the stdio channel, which lets an autonomous MCP-bound agentreact to push events without holding a separate HTTP connection. The- one-line installers `install-mcp.sh` and `install-mcp.ps1` fetch the+ installers `install-mcp.sh` and `install-mcp.ps1` fetch thematching binary from the latest Pulse release, verify the checksum manifestagainst Pulse's pinned release key, and then verify the binary's checksum.They refuse installation when any integrity evidence is unavailable or- invalid. Building from source stays available.+ invalid. [Verify the saved installer before running it](#install-the-mcp-adapter-safely).+ Building from source stays available.- **`cmd/agent-probe`** is a worked source example for discovery, triage,depth and push, not a production diagnostic tool. Its current credential inputdiff --git a/frontend-modern/public/docs/AGENT_SUBSTRATE.md b/frontend-modern/public/docs/AGENT_SUBSTRATE.mdindex 47afb3cec5..db8aed11a5 100644--- a/frontend-modern/public/docs/AGENT_SUBSTRATE.md+++ b/frontend-modern/public/docs/AGENT_SUBSTRATE.md@@ -15,6 +15,69 @@ monitoring or act on workloads. A tool listing or readiness badge is not anexecution grant or proof of recovery. Use only a client and model providerpermitted to receive the data in those responses.+## Install the MCP adapter safely++Install `pulse-mcp` on the machine running your MCP client, not on every+monitored host. It needs no Pulse token to install. Choose one **published+Pulse release tag**, not a Helm-chart tag or a development branch, and keep+that tag for both the installer and the binary it downloads.++Do not pipe a remote download into Bash or PowerShell. The installers verify+the binary against Pulse's signed checksum manifest, but that check runs+**inside the installer**: it cannot authenticate an unverified installer that+you have already executed. With GitHub CLI **2.97.0 or newer**, save and verify+the installer first. These download-only recipes use a new directory, never+overwrite an existing file, and stop if a download or verification fails.++On Linux, macOS or FreeBSD, replace `vX.Y.Z` with your chosen published tag:++```sh+(+ set -eu+ version=vX.Y.Z+ download_dir=$(mktemp -d)+ gh release download "$version" --repo rcourtman/Pulse \+ --pattern install-mcp.sh --dir "$download_dir"+ gh release verify "$version" --repo rcourtman/Pulse+ gh release verify-asset "$version" "$download_dir/install-mcp.sh" --repo rcourtman/Pulse+ printf 'Verified installer saved in %s\n' "$download_dir"+)+```++On Windows, use PowerShell. Native command failures need explicit checks even+when `$ErrorActionPreference` is `Stop`:++```powershell+$version = 'vX.Y.Z'+$downloadDir = Join-Path ([System.IO.Path]::GetTempPath()) ('pulse-mcp-' + [guid]::NewGuid())+New-Item -ItemType Directory -Path $downloadDir -ErrorAction Stop | Out-Null+gh release download $version --repo rcourtman/Pulse --pattern install-mcp.ps1 --dir $downloadDir+if ($LASTEXITCODE -ne 0) { throw 'Installer download failed; stop here.' }+gh release verify $version --repo rcourtman/Pulse+if ($LASTEXITCODE -ne 0) { throw 'Release verification failed; stop here.' }+gh release verify-asset $version (Join-Path $downloadDir 'install-mcp.ps1') --repo rcourtman/Pulse+if ($LASTEXITCODE -ne 0) { throw 'Installer verification failed; stop here.' }+Write-Output "Verified installer saved in $downloadDir"+```++Review the saved script locally **after verification and before running it**.+If any check fails or your CLI lacks a verification command, stop; do not use+a checksum from the same unverified download as a substitute, skip signature+checks, or fall back to executing a remote script. See+[release build provenance](INSTALL.md#verify-release-build-provenance) for the+separate build evidence and offline-verification requirements.++Only after successful verification and review, run that saved script as your+normal client user. For Unix, use `PULSE_MCP_VERSION=vX.Y.Z bash /path/to/install-mcp.sh`;+for Windows, use `& (Join-Path $downloadDir 'install-mcp.ps1') -Version $version`+in the same session. Keep the exact chosen tag; otherwise the installer defaults+to the latest release. Do not add `sudo`, weaken PowerShell execution policy,+remove macOS quarantine or bypass an operating-system warning to make it run.+Use your administrator's normal software approval path if it is blocked.+The installer also needs OpenSSH's `ssh-keygen` and refuses missing or invalid+signature evidence. Installation success is not a successful Pulse connection;+continue with the read-only setup below.+## Connect without granting control1. Inspect the manifest on the running server, not just this page. Its@@ -162,11 +225,12 @@ Pulse; verification can be unavailable without proving that nothing ran.`--emit-notifications` to translate Pulse's SSE events into JSON-RPCnotifications on the stdio channel, which lets an autonomous MCP-bound agentreact to push events without holding a separate HTTP connection. The- one-line installers `install-mcp.sh` and `install-mcp.ps1` fetch the+ installers `install-mcp.sh` and `install-mcp.ps1` fetch thematching binary from the latest Pulse release, verify the checksum manifestagainst Pulse's pinned release key, and then verify the binary's checksum.They refuse installation when any integrity evidence is unavailable or- invalid. Building from source stays available.+ invalid. [Verify the saved installer before running it](#install-the-mcp-adapter-safely).+ Building from source stays available.- **`cmd/agent-probe`** is a worked source example for discovery, triage,depth and push, not a production diagnostic tool. Its current credential inputdiff --git a/scripts/tests/test_external_agent_docs.py b/scripts/tests/test_external_agent_docs.pyindex dcc72673a5..87293ae6d3 100644--- a/scripts/tests/test_external_agent_docs.py+++ b/scripts/tests/test_external_agent_docs.py@@ -5,6 +5,8 @@ The copied HTTP recipes run only against synthetic guest-local fixtures."""from pathlib import Path+import json+import osimport reimport subprocessimport tempfile@@ -36,6 +38,88 @@ class ExternalAgentDocsTest(unittest.TestCase):def test_shipped_guide_matches_canonical(self):self.assertEqual(guide(), (ROOT / "frontend-modern/public/docs/AGENT_SUBSTRATE.md").read_text())+ def test_adapter_bootstrap_is_saved_verified_and_separate_from_execution(self):+ install = guide().split("## Install the MCP adapter safely\n", 1)[1].split("\n## ", 1)[0]+ readme = adapter_readme().split("## Install\n", 1)[1].split("\n## Quick start", 1)[0]+ for text in (install, readme):+ self.assertNotRegex(text, r"(?i)\|\s*(?:bash|sh|iex|invoke-expression)\b")+ self.assertNotIn("xattr -d", text)+ for fact in ("inside the installer", "cannot authenticate an unverified installer",+ "2.97.0", "before running it", "lacks a verification command, stop",+ "normal client user", "no Pulse token", "same session",+ "PowerShell execution policy", "macOS quarantine"):+ self.assertIn(fact, compact(install))+ self.assertIn("../../docs/AGENT_SUBSTRATE.md#install-the-mcp-adapter-safely", readme)+ # Match the real installer's signature boundary, not a claim that a+ # checksum alone authenticates a binary or the already-running script.+ for name in ("install-mcp.sh", "install-mcp.ps1"):+ source = (ROOT / "scripts" / name).read_text()+ self.assertIn("checksums.txt", source)+ self.assertIn("cryptographic signature verification failed", source)+ self.assertIn("ssh-keygen", source)++ def test_copied_unix_bootstrap_stops_at_each_failed_verification(self):+ install = guide().split("## Install the MCP adapter safely\n", 1)[1].split("\n## ", 1)[0]+ blocks = re.findall(r"```sh\n(.*?)```", install, re.S)+ self.assertEqual(len(blocks), 1)+ for failure, expected in (("download", ["download"]),+ ("verify", ["download", "verify"]),+ ("verify-asset", ["download", "verify", "verify-asset"]),+ ("none", ["download", "verify", "verify-asset"])):+ with self.subTest(failure=failure), tempfile.TemporaryDirectory() as temporary:+ home = Path(temporary)+ binary = home / "bin"+ binary.mkdir()+ fixture = binary / "gh"+ fixture.write_text('''#!/usr/bin/env python3+import json, os, pathlib, sys+args = sys.argv[1:]+with open(os.environ["MCP_CALLS"], "a") as log:+ log.write(json.dumps(args) + "\\n")+assert args[0] == "release"+assert args[2] == "v6.6.0"+assert args[args.index("--repo") + 1] == "rcourtman/Pulse"+assert not any(a in args for a in ("--clobber", "--skip-existing"))+if args[1] == os.environ["MCP_FAILURE"]:+ sys.exit(47)+if args[1] == "download":+ assert args[args.index("--pattern") + 1] == "install-mcp.sh"+ directory = pathlib.Path(args[args.index("--dir") + 1])+ with (directory / "install-mcp.sh").open("x") as out:+ out.write('echo executed > "$MCP_EXECUTED"\\n')+elif args[1] == "verify-asset":+ assert pathlib.Path(args[3]).name == "install-mcp.sh"+ assert pathlib.Path(args[3]).is_file()+else:+ assert args[1] == "verify"+''')+ fixture.chmod(0o755)+ calls = home / "calls.jsonl"+ executed = home / "executed"+ env = {**os.environ, "PATH": str(binary) + os.pathsep + os.environ["PATH"],+ "TMPDIR": str(home), "MCP_CALLS": str(calls),+ "MCP_EXECUTED": str(executed), "MCP_FAILURE": failure}+ result = subprocess.run(["sh", "-c", blocks[0].replace("vX.Y.Z", "v6.6.0")],+ cwd=home, env=env, text=True, capture_output=True)+ recorded = [json.loads(line) for line in calls.read_text().splitlines()]+ self.assertEqual([call[1] for call in recorded], expected)+ self.assertEqual(result.returncode, 0 if failure == "none" else 47, result.stderr)+ self.assertEqual("Verified installer saved in" in result.stdout, failure == "none")+ self.assertFalse(executed.exists(), "Download/verification must never execute the installer")++ def test_powershell_checks_native_exits_without_policy_bypass(self):+ install = guide().split("## Install the MCP adapter safely\n", 1)[1].split("\n## ", 1)[0]+ code, = re.findall(r"```powershell\n(.*?)```", install, re.S)+ commands = [line for line in code.splitlines() if line.startswith("gh ")]+ self.assertEqual(len(commands), 3)+ lines = code.splitlines()+ for command in commands:+ check = lines[lines.index(command) + 1]+ self.assertIn("if ($LASTEXITCODE -ne 0) { throw ", check)+ self.assertNotRegex(code, r"(?i)\biex\b|Invoke-Expression|ExecutionPolicy|Unblock-File|--clobber")+ self.assertIn("[guid]::NewGuid()", code)+ self.assertIn("-ErrorAction Stop", code)+def test_read_only_setup_does_not_grant_whole_surface_authority(self):text = compact(guide())self.assertIn("Start read-only", text)