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.
Install
Section titled “Install”curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bashThe 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.
docker run --rm -e OPENAI_API_KEY \ -v "$PWD:/work/source:ro" ghcr.io/0sec-labs/0security:latest --helpThe image runs CLI commands, not the browser app. Mount your code and pass your model key. See Server mode and Docker.
git clone https://github.com/0sec-labs/0security.git && cd 0securitypnpm install --frozen-lockfile && pnpm buildnode packages/cli/dist/index.js webYou need Node.js 24 or newer and pnpm. A source build has no global 0security command, so start it with node packages/cli/dist/index.js.
Install a specific version
Section titled “Install a specific version”The command above installs the latest release. To pin a version, point the installer at that release’s download folder:
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 bashReplace 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.
What the installer changes
Section titled “What the installer changes”- It writes
0security, the alias0and, unlessINSTALL_FOXGUARD=0,foxguard(with a.foxguard.sha256record) into the install folder. - It appends a block to
~/.profileand, depending on your shell, to~/.zshrc(zsh) or~/.bashrcplus~/.bash_profileor~/.bash_loginif one exists (bash). Running it again does not add the block twice. - With
cosign, the signature check makes cosign write~/.sigstore. Withgh, the attestation check may makeghcreate its own cache and configuration folders. The installer does not manage either.
Uninstall
Section titled “Uninstall”There is no uninstall command. Remove these by hand:
-
The install folder,
~/.0/binor yourINSTALL_DIR:rm -rf ~/.0/bin. Only remove a customINSTALL_DIRif it holds nothing else. -
The block the installer appended to
~/.profile, to~/.zshrcor~/.bashrc, and to~/.bash_profileor~/.bash_loginif they have it. It is these two lines, with the folder you installed to:Terminal window # 0.security CLIexport PATH='/home/you/.0/bin':"$PATH" -
~/.sigstore, if cosign created it. Other tools may use it too, so check first.
Update
Section titled “Update”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:
0security config doctor upgradeThe 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.
curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bashStart your first thread
Section titled “Start your first thread”-
Run
0security. The browser app opens athttp://127.0.0.1:48123. You do not need an account. -
Open Settings → Models and add a provider key or sign in. See Models.
-
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.
-
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.
Scan from the terminal
Section titled “Scan from the terminal”Everything the console does is also a command. Connect a model first, then scan a folder and read the findings.
export OPENAI_API_KEY=...0security scan ./your-repo0security findings listTo 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:
0security sbom generate . -o sbom.cdx.json0security sbom check sbom.cdx.jsonSee Dependency audit.
What 0 does and does not do
Section titled “What 0 does and does not do”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.
The words 0 uses
Section titled “The words 0 uses”| 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. |
Troubleshooting
Section titled “Troubleshooting”To check the runtime, your model provider and the CLIs on your path, run:
0security config doctor0: command not found
Section titled “0: command not found”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:
export PATH="$HOME/.0/bin:$PATH"A source build has no global 0security. Run node packages/cli/dist/index.js instead.
Download or checksum error
Section titled “Download or checksum error”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.
Model provider shows missing or bad
Section titled “Model provider shows missing or bad”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.
database is locked
Section titled “database is locked”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.
The app does not open
Section titled “The app does not open”Start 0 without opening a browser, then open the URL it prints:
0security --no-openOn 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.
Docker prints help and exits
Section titled “Docker prints help and exits”The image runs 0security --help by default and mounts nothing. Pass your folder, your key and a command. See Server mode and Docker.
Still stuck
Section titled “Still stuck”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.