By the Swiss Applied AI & Cybersecurity Research Lab
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.
curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bash
export OPENAI_API_KEY="your-api-key"
0security scan ./your-repoThe installer does not edit your shell startup files. It prints the export PATH=... line to run or add yourself. To have it add the line to ~/.profile and your shell's rc file, run curl -fsSL https://raw.githubusercontent.com/0sec-labs/0security/main/install.sh | bash -s -- --modify-path. Set INSTALL_DIR to install somewhere else.
The installer adds the command as 0security and as the short alias 0. Both run the same program. It also installs foxguard, the static analysis engine that 0 scan runs first; it is built from crates/foxguard in this repository and verified against the same checksums.txt. Set INSTALL_FOXGUARD=0 to skip it.
That scans the folder, prints a report and stops at a $5 budget. Any model provider works: set its key instead (see Models).
Windows, Docker and source installs are in the docs. Only scan code you own or are authorized to test.
| For | Start | |
|---|---|---|
| CLI | Scan, fix, SBOM and evidence from a terminal or a script | 0security scan . |
| Web console | Threads, findings and fixes in a browser, on your machine | 0security |
| GitHub Action | Scan each pull request and show the findings in GitHub's Security tab | Pull request checks |
- Reviews code. A fast scanner pass, then a model reads the code. Large repositories are reviewed in batches you can resume.
- Keeps one list of findings. Import SARIF or GitHub alerts from other scanners, then triage, accept a risk with an expiry, and export.
- Fixes findings as pull requests. One branch and PR per finding, with your tests run first. It never pushes to your base branch.
- Audits dependencies. Generate an SBOM, then check it for advisories, malicious packages, newer versions and license problems. See Dependency audit.
- Produces evidence. One folder of findings, SARIF and SBOM, optionally signed with your own key (enterprise license), and CRA report drafts.
- Checks AI apps and agent files. LLM apps, MCP servers, model files, AI coding tool configuration and live model endpoints. See AI security.
- Checks pull requests. A GitHub Action, plus templates for GitLab, Bitbucket, Jenkins and Azure Pipelines. Sentinels run standing jobs on a schedule or webhook.
- Runs for teams. A server mode with OIDC, and an enterprise license for shared findings, SAML, SCIM and audit logs. It can run with no outbound network except your model.
See everything 0 can do.
It is one binary and uses your own model keys. Run 0security for an optional web console.
Documentation · What 0 can do · Command reference · Models · Extensions · Security research · Enterprise
Report bugs in issues, improve the docs, or write a skill or extension. Start with the contributing guide, and open an issue before large changes. To report a vulnerability in 0 itself, see SECURITY.md.
MIT OR Apache-2.0. The enterprise/ folder is source-available under the 0security Enterprise License (enterprise/LICENSE): you can read and change it, and production use needs a license key. See enterprise/README.md.
