foxguard
Fast local security scanning for code, secrets, dependencies, and crypto risk.
Integrated into 0sec, the open cybersecurity harness.
npx foxguard .
Why
200+ built-in rules across 12 source languages, plus config and manifest checks
Taint tracking for 14 languages, with cross-file analysis for Python, JavaScript, Go, Java, Ruby, PHP, C#, and Kotlin
Fast local and CI scans, with diff mode for “what did this branch add?”
Secrets scanning, OSV-backed dependency scanning, and post-quantum crypto audit
Semgrep/OpenGrep-compatible YAML bridge that loads ~98% of the public registry (coverage report)
Terminal, JSON, SARIF, CycloneDX 1.6 CBOM, and Semgrep-compatible JSON output
Install
npx foxguard . # zero install
curl -fsSL https://foxguard.dev/install.sh | sh # prebuilt binary (macOS/Linux)
cargo install foxguard # from source
Prebuilt installs verify release binaries against checksums.txt. Release binaries also publish GitHub artifact attestations; use gh attestation verify for manual verification, or see release provenance.
GitHub Action:
- uses: 0sec-labs/foxguard/action@v0.13.1
with:
path: .
severity: medium
fail-on-findings: "true"
upload-sarif: "true"
pre-commit:
repos:
- repo: https://github.com/0sec-labs/foxguard
rev: v0.13.1
hooks:
- id: foxguard
Integrations: GitHub App, VS Code, Claude Code plugin, and MCP server.
Hosted GitHub App operations
foxguard-github-app writes newline-delimited JSON logs. Completed and failed
scans use event=foxguard.scan.completed and event=foxguard.scan.failed, with
delivery, installation, repository, PR, commit, duration, and usage_scope
fields for correlation. Keep identifiers as log fields, not metric labels.
Set FOXGUARD_INTERNAL_ACCOUNTS to a comma-separated list of your own GitHub
accounts and organizations. Matching is case-insensitive. Other owners are
classified as external; an unset list or missing owner produces unknown.
External activity is not proof of a paying customer, and scans are not people.
The installation registry is reconciled against all pages of GitHub's App installation API at startup and hourly. Failed refreshes retain existing state; concurrent webhooks take precedence. Sparse webhook metadata preserves known account details and observed repository names. Those names are not a complete inventory of an installation's accessible repositories.
Persist FOXGUARD_INSTALLATIONS_PATH and FOXGUARD_PULL_REQUEST_JOBS_PATH on
durable storage. Monitor foxguard.installations.reconcile_failed alongside
scan failures; foxguard.installations.reconciled reports the total and
internal/external/unknown installation counts after a successful refresh.
Size FOXGUARD_PR_WORKERS against measured scanner peak memory and the
container memory limit: child-process OOM kills can occur without restarting
the hosted application.
Quick Start
foxguard . # scan everything
foxguard diff main . # only new findings vs main
foxguard secrets . # leaked credentials and keys
foxguard sca . # dependency vulnerabilities from OSV
foxguard pqc . # post-quantum crypto audit
foxguard --format sarif . > results.sarif
foxguard --format semgrep-json . # Semgrep CLI-compatible JSON
Use foxguard --fix src/ or foxguard --fix src/app.py to apply supported taint
fixes in place. Targets are checked against the canonical scan directory or the
selected file; findings outside that scope are skipped. Python command-injection
fixes add import subprocess when needed, preserving module docstrings and future
imports. Review generated changes before committing.
Language Coverage
| Language | Built-in rules | Taint tracking | Framework-aware rules |
|---|---|---|---|
| JavaScript / TypeScript | Yes | Yes | Express, Next.js |
| Python | Yes | Yes | Django, Flask, FastAPI |
| Go | Yes | Yes | Gin |
| Kotlin | Yes | Yes | Spring |
| Java | Yes | Yes | Spring |
| Ruby | Yes | Yes | Rails |
| PHP | Yes | Yes | Laravel |
| Rust | Yes | -- | -- |
| C# | Yes | Yes | .NET |
| Swift | Yes | Yes | iOS |
| Haskell | Yes | -- | Cardano seed rules |
Taint tracking also covers C, Bash, and Solidity. Config, manifest, and external-rule scans cover Dockerfile, Nginx, Apache, HAProxy, HCL/Terraform, YAML/JSON/XML/HTML, C via Semgrep YAML/Coccinelle, and more.
Security Modes
foxguard sca .
foxguard pqc .
foxguard --rules ./semgrep-rules .
SCA supports Cargo.lock, package-lock.json, pnpm-lock.yaml, requirements.txt, poetry.lock, and Pipfile.lock. The PQC audit is a two-sided scorecard: it flags quantum-vulnerable primitives (RSA, ECDSA/DSA, ECDH/DH) with CNSA 2.0 migration deadlines, and it also detects post-quantum algorithms already in use (ML-KEM, ML-DSA, SLH-DSA, FN-DSA, HQC, and hybrids like X25519MLKEM768) as informational, quantum-resistant inventory — reporting a migration-readiness percentage. Both sides export to a CycloneDX 1.6 CBOM, where post-quantum algorithms appear as quantum-resistant assets rather than vulnerabilities.
Configuration
foxguard auto-discovers .foxguard.yml from the scan path upward.
scan:
baseline: .foxguard/baseline.json
disable_rules: [py/no-eval]
secrets:
exclude_paths: [fixtures, testdata]
Suppress an accepted finding inline with // foxguard: ignore[rule-id].
Documentation
Start with the documentation index. Key references: architecture, Semgrep/OpenGrep compatibility, and the release runbook.
Benchmarks
| Repo | LoC | foxguard | Semgrep | Speedup |
|---|---|---|---|---|
| express | 15K JS | 0.28s | 6.09s | 22x |
| flask | 14K Py | 0.33s | 6.51s | 20x |
| gin | 18K Go | 0.50s | 4.95s | 10x |
| sentry | 1.3M Py | 35s | 194s | 5x |
Reproduce with ./benchmarks/run.sh; results vary by machine. See benchmarks/README.md.
Contributing
See CONTRIBUTING.md for rule authoring, tests, and development setup.
License
MIT OR Apache-2.0 -- 0sec Labs
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foxguard-0.13.1-py3-none-win_amd64.whl.
File metadata
- Download URL: foxguard-0.13.1-py3-none-win_amd64.whl
- Upload date:
- Size: 9.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c843ebd557bd2f4d52ae55f4e0fda7ee936256d48a4fd54287849230ad2b15
|
|
| MD5 |
35d7be6436c3b1a94a90425f6c333bb7
|
|
| BLAKE2b-256 |
fcadb3d5086ca21bbc147e9ccb04ddaafdba919738269af7d514a3a3c1eca892
|
Provenance
The following attestation bundles were made for foxguard-0.13.1-py3-none-win_amd64.whl:
Publisher:
workflow.yml on 0sec-labs/foxguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foxguard-0.13.1-py3-none-win_amd64.whl -
Subject digest:
d0c843ebd557bd2f4d52ae55f4e0fda7ee936256d48a4fd54287849230ad2b15 - Sigstore transparency entry: 2802863195
- Sigstore integration time:
-
Permalink:
0sec-labs/foxguard@4ef56f868147ad290c294a4ed3c03881f087d93f -
Branch / Tag:
refs/tags/v0.13.1 - Owner: https://github.com/0sec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4ef56f868147ad290c294a4ed3c03881f087d93f -
Trigger Event:
push
-
Statement type:
File details
Details for the file foxguard-0.13.1-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: foxguard-0.13.1-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f41974b2aa7547e22d3c5140aee27d94bf1240c303ac60d70a7fc7d90ee24fee
|
|
| MD5 |
250bfa7594d831f546fb9b71221f5169
|
|
| BLAKE2b-256 |
81eec631f79b79494ae94351b17585fbeff28d2272135502a2950d5fdf3892ed
|
Provenance
The following attestation bundles were made for foxguard-0.13.1-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
workflow.yml on 0sec-labs/foxguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foxguard-0.13.1-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
f41974b2aa7547e22d3c5140aee27d94bf1240c303ac60d70a7fc7d90ee24fee - Sigstore transparency entry: 2802863257
- Sigstore integration time:
-
Permalink:
0sec-labs/foxguard@4ef56f868147ad290c294a4ed3c03881f087d93f -
Branch / Tag:
refs/tags/v0.13.1 - Owner: https://github.com/0sec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4ef56f868147ad290c294a4ed3c03881f087d93f -
Trigger Event:
push
-
Statement type:
File details
Details for the file foxguard-0.13.1-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: foxguard-0.13.1-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 9.9 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddf1ce7c9f4d52c6c3f0345096b70ea1a92ae84db3171af107b56eaae4af5cb
|
|
| MD5 |
512280c43cac975e17ec33e97edc2da8
|
|
| BLAKE2b-256 |
936175cccd9b5c0448b8a21816facbdeef8b38043a2977aee73d9f7da48d9e25
|
Provenance
The following attestation bundles were made for foxguard-0.13.1-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
workflow.yml on 0sec-labs/foxguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foxguard-0.13.1-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
eddf1ce7c9f4d52c6c3f0345096b70ea1a92ae84db3171af107b56eaae4af5cb - Sigstore transparency entry: 2802863078
- Sigstore integration time:
-
Permalink:
0sec-labs/foxguard@4ef56f868147ad290c294a4ed3c03881f087d93f -
Branch / Tag:
refs/tags/v0.13.1 - Owner: https://github.com/0sec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4ef56f868147ad290c294a4ed3c03881f087d93f -
Trigger Event:
push
-
Statement type:
File details
Details for the file foxguard-0.13.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: foxguard-0.13.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.2 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27f801ee993300cd52992f8cc300cd88a085b3dccecaed4bcc5b0ed67568e3d5
|
|
| MD5 |
9b4d3eca8fcad5d5a698492fa403bc19
|
|
| BLAKE2b-256 |
933d292654e06ee54a2439537fd46d7066ae8469b7e51b5c3db630135f25f051
|
Provenance
The following attestation bundles were made for foxguard-0.13.1-py3-none-macosx_11_0_arm64.whl:
Publisher:
workflow.yml on 0sec-labs/foxguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foxguard-0.13.1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
27f801ee993300cd52992f8cc300cd88a085b3dccecaed4bcc5b0ed67568e3d5 - Sigstore transparency entry: 2802863228
- Sigstore integration time:
-
Permalink:
0sec-labs/foxguard@4ef56f868147ad290c294a4ed3c03881f087d93f -
Branch / Tag:
refs/tags/v0.13.1 - Owner: https://github.com/0sec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4ef56f868147ad290c294a4ed3c03881f087d93f -
Trigger Event:
push
-
Statement type:
File details
Details for the file foxguard-0.13.1-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: foxguard-0.13.1-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 10.2 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ef0f5a13815a1d845288042931bc21100a0a427db8760e22e1197db857fa32
|
|
| MD5 |
7883dcdf6d662aeffe20e9745536ef2b
|
|
| BLAKE2b-256 |
2b8c8046082651eaa9030fdb57b45103eb7916a2c3c0acf43b240a4d22db022d
|
Provenance
The following attestation bundles were made for foxguard-0.13.1-py3-none-macosx_10_12_x86_64.whl:
Publisher:
workflow.yml on 0sec-labs/foxguard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foxguard-0.13.1-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
d0ef0f5a13815a1d845288042931bc21100a0a427db8760e22e1197db857fa32 - Sigstore transparency entry: 2802863160
- Sigstore integration time:
-
Permalink:
0sec-labs/foxguard@4ef56f868147ad290c294a4ed3c03881f087d93f -
Branch / Tag:
refs/tags/v0.13.1 - Owner: https://github.com/0sec-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4ef56f868147ad290c294a4ed3c03881f087d93f -
Trigger Event:
push
-
Statement type: