Safeguard Docs
Safeguard CLI

Safeguard CLI

Command-line interface for Safeguard software supply chain security

Safeguard CLI

The Safeguard CLI scans code, container images and SBOMs on your own machine, sends only the results to the platform, and includes an assistant that can fix what it finds.

Overview

The CLI allows you to:

  • Scan a directory, a Git repository, a container image or an existing SBOM for vulnerabilities
  • Find hardcoded secrets and misconfigurations
  • Validate SPDX, CycloneDX and VEX documents
  • Run platform-assigned scan jobs locally, uploading SBOMs and findings but never source
  • Fix and review code with the built-in assistant, interactively or in CI with safeguard exec

Quick Start

Install it — macOS and Linux:

curl -fsSL https://cli.safeguard.sh/install | bash

Windows:

irm https://cli.safeguard.sh/install.ps1 | iex

Then open the terminal and sign in:

safeguard

Type /login to authenticate, then /scan . to scan the folder you are in. Or just ask it something — "how many critical vulns do we have" works.

Key Features

FeatureDescription
Vulnerability scanningsafeguard scan builds an SBOM and matches it against vulnerability databases
Secrets and misconfigurationssafeguard detect, with table, JSON or SARIF output
SBOM validationsafeguard validate for CycloneDX, SPDX and VEX
Local runnerExecutes the platform's scan jobs on your machine; only results leave it
Assistantsafeguard agent interactively, safeguard exec non-interactively
Offline databasessafeguard update --import loads a vulnerability database downloaded elsewhere

Policies and gates are evaluated in the platform, not by the CLI. See Policies & gates.

Documentation

System Requirements

The CLI is a single static binary. There is no runtime to install alongside it — no Node, no Python, no JVM.

RequirementMinimum
Operating SystemmacOS, Linux, or Windows — see Platforms
Architecturex86_64 or arm64 (Windows ships x86_64 only)
Disk Space~40MB for the binary, plus the scanners it downloads on first use

Getting Help

# View all commands
safeguard --help

# Get help for a specific command
safeguard scan --help
safeguard detect --help

Next Steps

  1. Install the CLI
  2. Learn basic usage
  3. Integrate with CI/CD

On this page