Safeguard Docs

Local Runner

The runner built into the Safeguard CLI, which executes the platform's scan jobs and assistant turns on your own machine.

Local Runner

The runner is not a separate product. It is part of the safeguard CLI: open the interactive terminal, sign in, and the machine starts polling the platform for work assigned to it. It runs each scan job locally and uploads only the resulting SBOM and findings, never your source code.

When to use it

  • Your repository is private and you can't (or won't) give a cloud service OAuth access.
  • You're working in a restricted network, where only outbound HTTPS is allowed.
  • You want the assistant to fix vulnerabilities in code you haven't pushed yet.

Install

The runner ships with the CLI. Use the one-line installer:

# macOS and Linux
curl -fsSL https://cli.safeguard.sh/install | bash
# Windows
irm https://cli.safeguard.sh/install.ps1 | iex

There is no Homebrew formula, winget package or container image for it. See CLI installation for version pinning and checksums.

First run

safeguard

Type /login. Your browser opens, you approve the session, and the runner starts. The first run also downloads the scanner tools and the vulnerability database. safeguard runner opens the same terminal.

How it works

  1. The runner sends a heartbeat and polls the platform for jobs assigned to this machine. All traffic is outbound HTTPS that the runner opens; nothing connects to it.
  2. It executes a claimed job with its own local scan server.
  3. It uploads the result files (SBOM and findings) and reports the job status. Source code stays on the machine.

Headless

# Start without the terminal UI and serve assistant turns for this workspace
safeguard runner start --workspace ./path/to/repo

# Is it running, and what is it doing
safeguard runner status

# Drain in-flight work and stop
safeguard runner stop

runner start long-polls by default. On a network that forbids held connections, pass --poll-wait 0 to poll at a fixed interval (SAFEGUARD_POLL_INTERVAL seconds, default 10). --permission-mode sets how much the assistant may do without asking, from supervised to autonomous.

Assistant

# Interactive, in this workspace
safeguard agent "fix the critical CVEs in this repository"

# One turn, no prompts, for scripts and CI
safeguard exec "summarise the critical findings"

safeguard exec defaults to strict permissions, where nothing is asked and anything the policy file has not pre-approved is denied.

Updates

safeguard self-update

safeguard update is different: it refreshes the vulnerability databases, not the binary.

On this page