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.
- Code weaknesses mapped to standards. 37 built-in rules for secrets, JavaScript/TypeScript, and Python, plus semgrep's security rulesets, all labeled with CWE and OWASP Top 10 2025.
- 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.
- Adapts to your machine. Every supported tool found on
PATHis used automatically; missing ones are listed with their install command. On Kali Linux, nearly all of them are oneapt installaway. - 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 further: install the external tools for history, semgrep, and dependency checks, and point
--urlat a staging environment you own:bearscan scan --url https://staging.example.com
Installation
pipx install bearscan
# or
uv tool install bearscan
On Kali Linux, add the packaged external tools in one go:
sudo apt install -y pipx git gitleaks trufflehog testssl.sh sslscan whatweb
pipx install semgrep
osv-scanner, macOS with Homebrew, installing from source, 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
| 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. |
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 · 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.1.2
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.1.2.tar.gz | 273.8 kB | Without provenance | Details for bearscan-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bearscan-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for bearscan-0.1.2-py3-none-any.whl |
Total release size: 338.7 kB
Release files / bearscan-0.1.2.tar.gz
| Download URL | bearscan-0.1.2.tar.gz |
|---|---|
| Size | 273.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db643a86a8dc7480d451a397d35b32c6ad72899872b9549d48d051487d73fbae
|
|
BLAKE2b-256 checksum How to use checksums |
eae8cf77c16e83d92cc5536c038658f771b1f6ca08a973fa0d45ee4de645e79a
|
| 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.1.2-py3-none-any.whl
| Download URL | bearscan-0.1.2-py3-none-any.whl |
|---|---|
| Size | 64.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0507f903dd19220cb33e8fc06ec90cb799ca1d0855db2b3dd1e1a050f001ca3
|
|
BLAKE2b-256 checksum How to use checksums |
0c08a9acaa0616b7e9137dc2deca413840227e6f21ddee9de0bcb3dbf1c2de8a
|
| 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.1.2
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.