Skip to content
GitHubBook a demo

Use

Quickstart

0security is open-source software to deploy persistent AI security agents that find and fix security risks across any tech stack, work with any model, and run anywhere.

Terminal window
curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bash

The script supports Apple Silicon macOS and x64 or ARM64 Linux. It checks the binary’s checksum, installs it to ~/.0/bin and prints the export PATH=... line to run. It edits your shell startup files only if you pass --modify-path. The command is 0security, and 0 is a short alias for it. Set INSTALL_DIR to install somewhere else.

Windows is experimental. Download 0security-windows-x64.exe from Releases. The same file is also published as 0-windows-x64.exe, which is kept so existing installs can update. Rename the file to the command name you want.

The command above installs the latest release. To pin a version, point the installer at that release’s download folder:

Terminal window
curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh \
| RELEASE_BASE_URL=https://github.com/0sec-labs/0security/releases/download/vX.Y.Z bash

Replace vX.Y.Z with a tag from the releases page. A mistyped version stops with one installer line that names the file and the release URL it could not download, and curl’s own message stays above that line. These settings change the install:

Setting Effect
RELEASE_BASE_URL Where the installer downloads checksums.txt and the binaries. Use a release folder as above, or an internal mirror.
INSTALL_DIR Where the binaries go. Default ~/.0/bin. It is created only after the checksums and signature checks pass.
INSTALL_ATTESTATION=require Fail unless an authenticated gh (2.49 or newer) verifies the GitHub build-provenance attestation of checksums.txt. By default the check runs when gh is available and is skipped with a note when it is not. 0 skips it.
INSTALL_SIGNATURE=require Fail unless cosign verifies the Sigstore signature of checksums.txt against this repository’s release workflow. By default the check runs when cosign is installed and the release has a bundle, and is skipped with a note otherwise. 0 skips it.

The checksum of every binary is always compared with checksums.txt. That file comes from the same server as the binary, so only the attestation and the signature show that it came from this repository’s release workflow. The last line of the installer says exactly which checks ran, for example checksum verified; signature and attestation not verified. See Verify a release for the manual commands. The pinned CI examples in CI use the same RELEASE_BASE_URL.

  • It writes 0security, the alias 0 and, unless INSTALL_FOXGUARD=0, foxguard (with a .foxguard.sha256 record) into the install folder.
  • It appends a block to ~/.profile and, depending on your shell, to ~/.zshrc (zsh) or ~/.bashrc plus ~/.bash_profile or ~/.bash_login if one exists (bash). Running it again does not add the block twice.
  • With cosign, the signature check makes cosign write ~/.sigstore. With gh, the attestation check may make gh create its own cache and configuration folders. The installer does not manage either.

There is no uninstall command. Remove these by hand:

  1. The install folder, ~/.0/bin or your INSTALL_DIR: rm -rf ~/.0/bin. Only remove a custom INSTALL_DIR if it holds nothing else.

  2. The block the installer appended to ~/.profile, to ~/.zshrc or ~/.bashrc, and to ~/.bash_profile or ~/.bash_login if they have it. It is these two lines, with the folder you installed to:

    Terminal window
    # 0.security CLI
    export PATH='/home/you/.0/bin':"$PATH"
  3. ~/.sigstore, if cosign created it. Other tools may use it too, so check first.

0 checks GitHub for a new release when it starts in a terminal, at most once a day, and installs it. A console that stays open checks every six hours and shows an update card with Update and restart. To change this, open Settings → Updates and choose off, notify or automatic. See Update checks.

To update now, run:

Terminal window
0security config doctor upgrade

The command verifies the checksum, then replaces the binary you started it from.

Copies older than 0.33 cannot update from the console. Run the installer again once. It installs the latest release and keeps your settings.

Terminal window
curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bash
  1. Run 0security. The browser app opens at http://127.0.0.1:48123. You do not need an account.

  2. Open Settings → Models and add a provider key or sign in. See Models.

  3. Press New thread, pick a folder and describe the job. For example: “Review this folder for injection bugs and verify what you find”. See Threads.

  4. Open Findings. Each finding links to its evidence. See Findings for how a finding becomes verified.

The Finish setting up card in the sidebar tracks the model and thread steps.

Everything the console does is also a command. Connect a model first, then scan a folder and read the findings.

Terminal window
export OPENAI_API_KEY=...
0security scan ./your-repo
0security findings list

To export findings, add --format sarif or --format json to 0security findings list. To scan only what a branch changed, see Pull request checks. The CLI reference lists every command.

To check your dependencies instead, run:

Terminal window
0security sbom generate . -o sbom.cdx.json
0security sbom check sbom.cdx.json

See Dependency audit.

0 reads your code, checks your dependencies and configuration, and runs your tests. It does not attack running applications on its own.

Two things send traffic to a live target, and only to one you name. 0security probe tests model and agent endpoints. 0security scan --scanner nuclei --target-url runs Nuclei, which you installed, against one app. Both refuse hosts you have not confirmed. See probe and Use Nuclei, ZAP or Strix.

For the full list of what 0 can do, see What 0 can do.

Term Meaning
Thread A conversation with the agent. You describe a job, and it plans, runs tools and records findings. See Threads.
Sentinel A named, standing job. It runs on a schedule, on a pull request or by hand. See Sentinels.
Computer The machine where threads run: this one, a VM or a remote server. See Computers.
Folder The directory a thread works in.
Skill A folder of instructions the agent loads when a task needs it. It is not code. See Skills.
Extension An installable git folder, pinned to a commit. It can bundle skills, scripts, MCP servers and a connection. See Extensions.
Finding A security issue with evidence. A finding without reproduced evidence is a lead. See Findings.

To check the runtime, your model provider and the CLIs on your path, run:

Terminal window
0security config doctor

The installer does not edit your shell startup files unless you ran it with --modify-path, so a new terminal does not fix this by itself. Run this line, and add it to your profile to keep it:

Terminal window
export PATH="$HOME/.0/bin:$PATH"

A source build has no global 0security. Run node packages/cli/dist/index.js instead.

The installer refuses a binary that does not match the release checksums.txt. Run it again. Release assets are 0security-darwin-arm64, 0security-linux-x64 and 0security-linux-arm64. The installer falls back to the older 0-<platform> names, which are published too so existing installs can update. For Windows, download 0security-windows-x64.exe yourself. Intel Macs have no native release, so use Docker or a source build. 0security config doctor upgrade does not support Windows.

0 found no usable model credential. Connect one in Settings → Models or export a key. A provider marked configured has a key, but 0 does not test it until the first request. See Models.

Two processes are writing the same SQLite file. Stop the other one. Do not delete a live database.

0security config doctor --fix moves a damaged file aside and creates a new one. It does not recover rows, so back up first.

Start 0 without opening a browser, then open the URL it prints:

Terminal window
0security --no-open

On macOS, the first access to Desktop, Documents or Downloads asks for permission. If you declined, enable the app that runs 0 under System Settings → Privacy & Security → Files & Folders.

The image runs 0security --help by default and mounts nothing. Pass your folder, your key and a command. See Server mode and Docker.

Run 0security config doctor and open an issue with its output, the command and the error. Remove keys, tokens and target data first. To report a vulnerability in 0 itself, follow SECURITY.md.