Desktop Application
The Safeguard desktop app — an Electron app that pairs the hosted web app with a local panel for file access, CLI execution, MCP hosting, and agent-driven tasks.
Desktop Application
The Safeguard desktop app is a cross-platform Electron application for macOS, Windows, and Linux. It doesn't replace the web app — it wraps it. One window is split into two views: the familiar Safeguard web app on the left, and a local panel on the right that can reach things a browser tab never can, like your filesystem, a local shell, and MCP servers.
Architecture
The main window renders two independent views side by side:
- Web view (~75% of the width) — loads
https://app.safeguard.shdirectly, through a minimal preload script that exposes a smallwindow.desktopAPI(panel control and detection only). This is the same web app described in Web Application; nothing about it is modified for desktop. - Panel view (~25% of the width) — a local Vite + React single-page app, served from files bundled with the app rather than fetched from the network. It gets a full preload API (
window.panelAPI) with IPC access to native capabilities: filesystem, shell, scanner, MCP, agent tasks, screen, and updater.
Toggle the panel with Ctrl+Shift+S (Cmd+Shift+S on macOS), or from the View menu. The split is resizable by dragging the divider, with minimum widths enforced on both sides; your preferred width is remembered between launches.
| Shortcut | Action |
|---|---|
Ctrl+Shift+S / Cmd+Shift+S | Toggle panel |
Ctrl+N / Cmd+N | New scan |
Ctrl+O / Cmd+O | Open project (folder picker) |
Ctrl+, / Cmd+, | Open settings |
The app also registers a safeguard:// deep-link protocol — safeguard://scan, safeguard://terminal, safeguard://mcp, safeguard://tasks, safeguard://files, and safeguard://settings open the panel directly on that tab; safeguard://dashboard navigates the web view. For example, a link or shell command like:
open "safeguard://scan" # macOS
start "" "safeguard://scan" # Windows
xdg-open "safeguard://scan" # Linuxbrings the app to the front with the panel already open on the Scan tab.
Supported Platforms
| Platform | Installers | Architectures |
|---|---|---|
| macOS | .dmg, .zip | x64, arm64 (universal) |
| Windows | .exe (NSIS installer) | x64, arm64 |
| Linux | .AppImage, .deb, .rpm | x64 |
Installers are built and code-signed per platform (Apple notarization on macOS; a certificate-based or Azure Key Vault signing flow on Windows) and published as GitHub Releases artifacts. Ask your Safeguard admin for your organization's current download link if you don't already have one.
First Run
- Install and open the app. The left pane loads the Safeguard web app and you sign in exactly as you would in a browser.
- Press Ctrl+Shift+S / Cmd+Shift+S to open the panel, or leave it closed if you only need the web app for now.
- The panel opens on its Files tab, where you grant folder access through your OS's native file picker. The app can only read folders you've explicitly granted — every file operation is checked against that list, and path traversal (
../) out of a granted folder is rejected. - From there, use the other panel tabs (Scan, Terminal, MCP, Tasks, Settings) as needed — nothing requires an install step beyond the app itself.
The web view and the panel are isolated from each other. The web app only ever sees a minimal detection/panel-control API — it cannot read your files, run shell commands, or drive the panel's native capabilities directly.
Capabilities
The panel is organized into tabs, each backed by its own service in the Electron main process.
| Tab | What it does |
|---|---|
| Scan | Add local projects, run vulnerability scans against them, view results by severity, and toggle auto-scan per project. |
| Terminal | Run allowlisted CLI commands (safeguard-cli, git, docker, npm, and other common dev-tool binaries — full list below) with their output shown in-app. |
| MCP | Start and stop MCP servers, including a one-click Safeguard MCP server exposing 650+ tools, connect external MCP servers, and browse/invoke tools directly. |
| Tasks | Submit natural-language tasks, watch agent progress, approve or deny destructive actions before they run, and schedule recurring tasks. |
| Files | Grant and revoke folder access, and browse the file trees you've granted. |
| Settings | Auto-update mode, theme, minimize-to-tray, action-approval mode, prompt-injection detection, and version/platform info. |
Local scanning
Point the Scan tab at a granted local folder to run a vulnerability scan without pushing the project anywhere first. Choose quick (searches shallower into the folder tree for manifests and runs the CLI in its faster mode) or full (searches deeper into subdirectories for a more thorough pass) per project, then re-run on demand, or flip a project's auto-scan toggle on. Results are grouped by severity — critical, high, medium, low, and unknown — the same tiers used elsewhere in Safeguard. Scanning is orchestrated locally and can fall back to manifest-based analysis if the bundled Safeguard CLI binary isn't available for your platform yet.
Terminal
Commands run through the Terminal tab are restricted to a fixed allowlist of binaries, grouped by purpose:
| Category | Allowed binaries |
|---|---|
| Safeguard tools | safeguard-cli, safeguard, sg, safeguard-agent |
| Version control | git, gh |
| Containers | docker, docker-compose, podman |
| Package managers | npm, yarn, pnpm, bun, pip, pip3, go, cargo, mvn, gradle |
| Runtimes | python, python3, node, deno |
| System utilities | curl, wget, ssh, scp, rsync, tar, unzip, zip, make, cmake |
Anything outside this list is rejected before it runs, with an error naming the command and the full allowlist. The working directory for a command must also be inside a folder you've granted access to — a cwd outside every granted folder is rejected the same way, even if the command itself is allowed.
# Runs — git is on the allowlist, and the cwd is a granted folder
git status
# Rejected — perl is not on the allowlist
perl -e 'print "hi"'MCP hosting
The MCP tab manages the lifecycle of MCP servers running alongside the app — starting and stopping them, connecting to external servers, and letting you browse and invoke their tools directly from the panel. The bundled Safeguard MCP server exposes 650+ tools out of the box (tenant-gated, with a curated default set enabled); see MCP Integrations for what those tools cover and Tool Gating for controlling which ones an agent can call.
Besides the one-click Safeguard server, the tab lets you connect an external server by name and URL, for MCP servers that speak HTTP/SSE rather than stdio.
Each running server shows a status of starting, running, stopped, or crashed, and its tool count; expand it in the panel to browse and manually invoke individual tools.
Agentic tasks
The Tasks tab is where the desktop app's agentic layer lives. Submit a task in natural language and the app matches it against a set of built-in workflows — local repo scan, MCP configuration audit, dependency watch, container scan, or IDE extension check — or falls back to a generic multi-step breakdown if nothing matches. Each subtask runs in sequence, and progress is surfaced live, including each subtask's status and result. You can cancel a running task at any point.
Approvals. When a subtask is about to take a destructive action, the task pauses and raises an approval request with a description of what it's about to do; you approve or deny it before execution continues.
Recurring tasks. Rather than re-submitting a task, schedule it to run on a fixed interval. Intervals are a number plus a unit — seconds, minutes, hours, or days:
30s → every 30 seconds
5m → every 5 minutes
1h → every hour
24h → every 24 hoursFor example, scheduling the description "Re-scan the granted project folders and flag any new critical findings" with an interval of 24h re-runs that task once a day; each scheduled task can be individually enabled, disabled, or deleted from the Tasks tab.
System tray and native menu
The app installs a native menu bar and a system tray icon for quick access to panel tabs and app controls without bringing the main window to the front.
Privacy and Security
- Renderer isolation — both the web view and the panel run with
nodeIntegration: false,contextIsolation: true, andsandbox: true. Neither renderer has direct Node.js access; everything native goes through IPC. - Two-preload model — the web view's preload (
window.desktopAPI) only exposes panel detection and control. The panel's preload (window.panelAPI) exposes the full native surface (filesystem, shell, scanner, MCP, agent, screen, updater) and runs in its own session partition with its own Content Security Policy. - Filesystem scoping — folder access is granted per-folder through the OS file picker, every file operation is validated against the granted-folder list, and path traversal outside a granted folder is rejected.
- Shell allowlist — programmatic command execution is restricted to a fixed set of binaries (listed above), and each command's working directory must be inside a folder you've explicitly granted; nothing else can be run through the app.
- Navigation lockdown — the web view will only navigate within
*.safeguard.sh; external links open in your default browser instead of inside the app. The panel view only ever loads its own local, bundled content. - Computer-use safety — for the screen-control features, per-app permission is required before the app can take mouse/keyboard control, banking/crypto/password-manager/trading apps are blocked by default, actions are logged with before/after screenshots, and screen content is checked for prompt-injection patterns before the agent acts on it.
Auto-Update
The app checks for updates on launch and every four hours, using electron-updater against GitHub Releases. You control what happens when an update is found, under Settings:
- Auto-install — downloads and installs automatically on quit.
- Ask before install (default) — notifies you and waits for confirmation.
- Manual — only checks when you click "Check for Updates."
System Requirements
The desktop app is a standard Electron application; if your machine comfortably runs other modern desktop apps built the same way, it will run Safeguard Desktop. A few capabilities depend on tools already being present on your machine rather than on the app itself:
- Container scanning needs a local Docker or Podman daemon to connect to.
- Terminal commands that invoke
git,npm,python, etc. need those binaries installed and on yourPATH. - Everything else — the web view, panel, scanning UI, and MCP hosting — works out of the box with no additional install.
Uninstall
Uninstalling follows the normal convention for each platform's installer format:
- macOS (
.dmg/.zip): drag the app to Trash. - Windows (NSIS installer): Settings → Apps → Installed apps, then uninstall Safeguard.
- Linux: remove via your package manager if you installed the
.deb/.rpm(e.g.apt remove/dnf remove), or simply delete the.AppImagefile.
Common errors
Left side of the window is blank / white. The web view couldn't reach app.safeguard.sh — check your internet connection. The panel on the right works independently and isn't affected.
The panel won't open. Press Ctrl+Shift+S (Cmd+Shift+S on macOS), or use View → Toggle Panel from the menu bar.
Scan tab shows "CLI not available." The bundled safeguard-cli binary isn't present for your platform in this build. Scanning falls back to manifest-based analysis automatically; functionality is reduced but not blocked.
A command I expect to run in Terminal is rejected. Only the binaries in the allowlist above can be executed from the panel, and its working directory must be inside a folder you've granted access to. Both checks run before the command starts, and neither is configurable per user — the error message names the command or path that failed and, for a disallowed binary, the full current allowlist.
An MCP server I started shows status "Crashed." The server process exited on its own after starting — the panel just reports the process's exit, it doesn't diagnose why. Confirm the command runs correctly on its own outside the app with the same arguments and environment variables, then try starting it again from the MCP tab.
Scheduling a recurring task fails with "Invalid interval format." The interval must be a number immediately followed by s, m, h, or d (seconds/minutes/hours/days) — e.g. 30s, 5m, 1h, 24h. Other formats, including cron expressions, aren't accepted.
Related
- Web Application — the hosted app the desktop client's left pane loads.
- MCP Integrations — what the bundled Safeguard MCP server's tools cover.
- Tool Gating — controlling which MCP tools an agent is allowed to call.
- CLI — the standalone Safeguard CLI bundled with the desktop app's scanner.
- Runner — local workflow execution outside the desktop app.