Defensive AppSec scanner for the code and staging environments you own.
Secrets, insecure code, vulnerable dependencies, and TLS, mapped to OWASP Top 10 2025 and triaged by an LLM.
Quick start · Documentation · Kali Linux guide · Changelog
bearscan audits a repository or a staging URL with one command. It runs its own rules, drives the open-source security tools already installed on your machine, merges everything into one report with CWE and OWASP Top 10 2025 labels, and asks an LLM to separate real problems from noise. The reviewer runs on your existing Claude Code or Codex login, or fully locally with Ollama.
Real output: a demo repository scanned on Kali Linux with all four code tools installed, triaged by Claude Code.
Highlights
- Secrets, now and in history. 15 secret detectors with masking everywhere, plus gitleaks and trufflehog to find keys in commits you deleted long ago. A key found by several tools is reported once.
- Mapped to every relevant OWASP list. 47 built-in rules for secrets, JavaScript/TypeScript, Python, and LLM and AI agent applications, plus semgrep's security rulesets. Each finding carries its CWE, its OWASP Top 10 2025 category, and, where it applies, the OWASP API Security Top 10 2023, LLM Top 10 2025 and 2026, and Agentic Top 10 2026 labels (coverage).
- AI apps and agents. Catches model output executed as code or rendered as HTML, agents with shell
tools,
trust_remote_code=True, pickled models and vector stores, LLM keys shipped to browsers, and user input in system prompts. - Vulnerable dependencies. osv-scanner checks your lockfiles and names the version that fixes each advisory.
- Staging checks.
--urlruns testssl.sh (or sslscan) and whatweb for protocols, ciphers, certificates, HSTS, and version disclosure. - Triage, not noise. An LLM reviewer labels each finding likely real, false positive, or uncertain, with a confidence, a rationale, and a fix. It can never change a severity or hide a finding from the JSON.
- Everything in one command. Every supported tool found on
PATHis used automatically,bearscan setupinstalls the missing ones (Homebrew on macOS, apt on Kali Linux), andbearscan scan --dockerruns all of them inside the official Kali image with nothing to install but Docker. - Private by design. Secrets are masked before anything is printed, saved, or sent, and you can see exactly what leaves your machine.
Quick start
-
Install bearscan (Python 3.12+):
pipx install bearscan
-
Scan the repository you are in. Without a reviewer installed, add
--no-review:cd my-repo bearscan scan
-
Go full: let bearscan install the external tools for git history, semgrep, dependency, and TLS checks, or run them all from the Kali image instead:
bearscan setup # installs what is missing, after asking bearscan scan # now with every tool bearscan scan --docker # or: no installs, every tool runs inside Kali
Installation
pipx install bearscan
# or
uv tool install bearscan
Then add the external tools with one command, on macOS (Homebrew) or Kali, Debian, and Ubuntu (apt):
bearscan setup
Prefer containers? bearscan scan --docker uses ghcr.io/cristhianzl/bearscan, a Kali image with every
tool, for amd64 and arm64. Manual installs, reviewers, and upgrades are covered in the
installation guide.
Usage
bearscan scan # scan the current directory, triage with Claude Code
bearscan scan --path ./my-repo # scan another repository
bearscan scan --llm codex # triage with Codex
bearscan scan --llm ollama # triage with a local model
bearscan scan --no-review # deterministic checks only
bearscan scan --json > run.json # machine-readable output
bearscan scan --url https://staging.example.com # TLS, certificate, and server checks
bearscan scan --docker # every tool, inside the Kali image
bearscan setup # install the missing tools
| Option | Description |
|---|---|
--path DIR / --url URL |
What to scan: a repository (default: the current directory) or a URL. |
--review / --no-review |
Triage findings with an LLM (default: on). |
--llm |
claude-code (default), codex, ollama, or litellm. |
--model, --llm-base-url |
Model and endpoint for the reviewer. |
--max-review N |
Most findings sent to the reviewer (default: 60). |
--json |
Print the run as JSON instead of the report. |
--docker |
Run the tools inside the Kali image; the review still runs on your machine. |
Every option, environment variable, and exit code is in the usage guide.
How it works
- Collect the files git tracks (or walk the tree outside git), skipping binaries, lockfiles, and
anything in
.gitignore. - Detect with the built-in rules and every installed tool, then normalize each result to one severity scale with CWE and OWASP Top 10 2025 labels.
- Merge duplicates: one finding per secret, and no semgrep repeats of built-in findings.
- Review the findings that have code context with the LLM backend you chose.
- Report in the terminal or as JSON, and save the run privately.
Deterministic checks decide what a finding is and how severe it is; the reviewer only adds a verdict and a fix. See the architecture for the details.
External tools
| Tool | Target | Adds |
|---|---|---|
| gitleaks | --path |
Secrets anywhere in git history |
| trufflehog | --path |
Hundreds of extra secret detectors over git history |
| semgrep | --path |
AST-based analysis with the p/default and p/owasp-top-ten rulesets |
| osv-scanner | --path |
Known CVEs in lockfiles and manifests |
| testssl.sh | --url |
Protocols, ciphers, certificates, TLS vulnerabilities, HSTS |
| sslscan | --url |
Fast TLS fallback when testssl.sh is unavailable |
| whatweb | --url |
Server and framework version disclosure |
LLM reviewers
--llm |
Runs on | How bearscan calls it |
|---|---|---|
claude-code |
your Claude Code login | Headless, no tools, restricted mode, empty working directory |
codex |
your Codex login | codex exec in a read-only sandbox, shell and web search off |
ollama |
your machine | Local API with a JSON schema, temperature 0 |
litellm |
any OpenAI-compatible endpoint | Chat completions with a JSON schema |
Only the flagged line and two lines of context on each side are sent, with secrets masked and repository text fenced as untrusted data. Details in LLM triage.
Privacy and security
- The built-in scan sends nothing anywhere;
--no-reviewwith no tools installed is fully offline. - trufflehog never verifies secrets with their providers; semgrep runs with metrics off and never uploads code; osv-scanner sends only package names and versions.
- Saved runs are written with
0600permissions, because they map your weaknesses.
The full picture is in the security model.
Documentation
Installation · Kali Linux · Docker · Usage · LLM triage · External tools · Rules · Output format · Security model · Architecture · Troubleshooting
Roadmap
- Built-in
--urlchecks with Playwright: CSP, CORS, cookie flags, and data exposure in API responses --fail-on <severity>exit codes and SARIF output for CI pipelinesbearscan report --pdffor an executive summary andbearscan report --webfor a local dashboard- A pre-commit hook and a GitHub Action
Ideas and votes are welcome in issues.
Contributing
Contributions are welcome, from rule reports to new tool adapters. Read CONTRIBUTING.md to set up the project, and follow the Code of Conduct.
Security
Found a vulnerability in bearscan itself? Please report it privately as described in SECURITY.md.
Responsible use
bearscan is a defensive tool. Scan only code and systems you own or are explicitly authorized to test.
Acknowledgements
bearscan stands on the shoulders of the tools it drives: gitleaks, trufflehog, semgrep, osv-scanner, testssl.sh, sslscan, and whatweb. Its terminal output is built with Rich and Typer, and its reviewer design borrows ideas from open-source AI security agents such as Strix, Shannon, and PentAGI.
License
Licensed under the Apache License 2.0.
Metadata
Release files for bearscan 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bearscan-0.2.0.tar.gz | 291.3 kB | Without provenance | Details for bearscan-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bearscan-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bearscan-0.2.0-py3-none-any.whl |
Total release size: 367.1 kB
Release files / bearscan-0.2.0.tar.gz
| Download URL | bearscan-0.2.0.tar.gz |
|---|---|
| Size | 291.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ed0380b5cc0fbfa53861016ca8f709e6053cb4d5fcb51402c356d71eebcf99c
|
|
BLAKE2b-256 checksum How to use checksums |
6980a553f2b60f5d5fb67379f14345ea5173ccfd580938d1878bac6eac7b11e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / bearscan-0.2.0-py3-none-any.whl
| Download URL | bearscan-0.2.0-py3-none-any.whl |
|---|---|
| Size | 75.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8584f5f873d661efb5acf4a441ec9996a19075cbc3ac2f1cfd62da5528514d24
|
|
BLAKE2b-256 checksum How to use checksums |
3df1874b58860cea1e5bdebe76b81b55be664a3c581794d39593064cf9d23bf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for bearscan 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.