bearscan 0.1.2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bearscan-0.1.2 → bearscan-0.2.0}/CHANGELOG.md +24 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/PKG-INFO +27 -15
- {bearscan-0.1.2 → bearscan-0.2.0}/README.md +26 -14
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/README.md +2 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/architecture.md +9 -3
- bearscan-0.2.0/docs/docker.md +84 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/external-tools.md +10 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/installation.md +31 -6
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/kali-linux.md +9 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/output-format.md +1 -0
- bearscan-0.2.0/docs/rules.md +207 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/schema/scan-run.schema.json +9 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/security-model.md +9 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/troubleshooting.md +17 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/usage.md +10 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/pyproject.toml +1 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/secrets.py +2 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/semgrep.py +4 -1
- bearscan-0.2.0/src/bearscan/adapters/standards.py +21 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/web.py +2 -0
- bearscan-0.2.0/src/bearscan/agents/container.py +67 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/agents/orchestrator.py +16 -16
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/builder.py +1 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/catalog/javascript.toml +3 -0
- bearscan-0.2.0/src/bearscan/checks/catalog/llm.toml +123 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/catalog/python.toml +5 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/catalog/secrets.toml +14 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/engine.py +15 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/rules.py +3 -1
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/cli/app.py +13 -2
- bearscan-0.2.0/src/bearscan/cli/audits.py +81 -0
- bearscan-0.2.0/src/bearscan/cli/setup_command.py +86 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/models.py +2 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/process.py +6 -1
- bearscan-0.2.0/src/bearscan/core/standards.py +8 -0
- bearscan-0.2.0/src/bearscan/installer/osv.py +53 -0
- bearscan-0.2.0/src/bearscan/installer/plan.py +77 -0
- bearscan-0.2.0/src/bearscan/installer/recipes.py +21 -0
- bearscan-0.2.0/src/bearscan/installer/system.py +26 -0
- bearscan-0.2.0/src/bearscan/report/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/report/terminal.py +2 -1
- bearscan-0.2.0/tests/e2e/kali_smoke.sh +68 -0
- bearscan-0.2.0/tests/test_container.py +134 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_engine.py +8 -0
- bearscan-0.2.0/tests/test_installer.py +121 -0
- bearscan-0.2.0/tests/test_llm_rules.py +118 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/uv.lock +1 -1
- bearscan-0.1.2/docs/rules.md +0 -124
- bearscan-0.1.2/src/bearscan/cli/audits.py +0 -47
- {bearscan-0.1.2 → bearscan-0.2.0}/.gitignore +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/LICENSE +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/assets/banner.jpg +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/assets/demo-scan-path.svg +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/assets/demo-scan-url.svg +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/docs/llm-triage.md +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/base.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/errors.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/execution.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/gitleaks.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/mapping.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/osv.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/osv_schema.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/registry.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/sslscan.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/testssl.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/trufflehog.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/adapters/whatweb.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/agents/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/agents/prompts.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/agents/reviewer.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/entropy.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/errors.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/files.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/jwt.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/sources.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/checks/spans.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/cli/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/cli/observer.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/fingerprint.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/redaction.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/run.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/severity.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/core/store.py +0 -0
- {bearscan-0.1.2/src/bearscan/llm → bearscan-0.2.0/src/bearscan/installer}/__init__.py +0 -0
- {bearscan-0.1.2/src/bearscan/report → bearscan-0.2.0/src/bearscan/llm}/__init__.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/base.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/claude_code.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/codex.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/errors.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/factory.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/http_client.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/json_extract.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/ollama.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/llm/openai_compat.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/src/bearscan/report/theme.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/support.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_adapters_code.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_adapters_secrets.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_adapters_web.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_claude_code_provider.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_cli.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_codex_provider.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_core.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_docs.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_execution.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_files.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_http_providers.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_orchestrator.py +0 -0
- {bearscan-0.1.2 → bearscan-0.2.0}/tests/test_reviewer.py +0 -0
|
@@ -7,6 +7,28 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.0] - 2026-11-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `bearscan setup` installs the missing external tools: one `brew install` on macOS, and `apt-get`, `pipx`
|
|
15
|
+
(or `uv`), and a SHA-256-verified osv-scanner download on Kali, Debian, and Ubuntu. `--dry-run` only shows
|
|
16
|
+
the plan and `--yes` skips the confirmation.
|
|
17
|
+
- `bearscan scan --docker` runs every tool inside the official Kali image with the repository mounted
|
|
18
|
+
read-only, then triages the findings on the host with your own reviewer. `BEARSCAN_DOCKER_IMAGE` selects
|
|
19
|
+
another image.
|
|
20
|
+
- A Kali Linux image with bearscan and all seven tools, published to `ghcr.io/cristhianzl/bearscan` for
|
|
21
|
+
amd64 and arm64 on every release.
|
|
22
|
+
- An end-to-end workflow that runs every tool inside the image against real inputs on each change and every
|
|
23
|
+
week, to catch tools whose output format changes.
|
|
24
|
+
- Ten rules for LLM and AI agent applications: model output executed as code or rendered as raw HTML, agents
|
|
25
|
+
given shell or code interpreter tools, dangerous-code and unsafe-deserialization opt-ins, models loaded with
|
|
26
|
+
`trust_remote_code=True` or pickle, LLM SDKs and provider keys exposed to browsers, and user input placed in
|
|
27
|
+
system prompts.
|
|
28
|
+
- A `standards` field on every finding with the other OWASP lists it belongs to: API Security Top 10 2023,
|
|
29
|
+
Top 10 for LLM Applications 2025 and 2026, and Top 10 for Agentic Applications 2026. Tool findings get
|
|
30
|
+
labels from their CWE, and the report shows them next to the CWE and OWASP 2025 category.
|
|
31
|
+
|
|
10
32
|
## [0.1.2] - 2026-11-29
|
|
11
33
|
|
|
12
34
|
### Changed
|
|
@@ -46,7 +68,8 @@ First public release.
|
|
|
46
68
|
- Kali Linux support, including install instructions for every external tool.
|
|
47
69
|
- Published on PyPI: `pipx install bearscan`.
|
|
48
70
|
|
|
49
|
-
[Unreleased]: https://github.com/cristhianzl/bearscan/compare/v0.
|
|
71
|
+
[Unreleased]: https://github.com/cristhianzl/bearscan/compare/v0.2.0...HEAD
|
|
72
|
+
[0.2.0]: https://github.com/cristhianzl/bearscan/compare/v0.1.2...v0.2.0
|
|
50
73
|
[0.1.2]: https://github.com/cristhianzl/bearscan/compare/v0.1.1...v0.1.2
|
|
51
74
|
[0.1.1]: https://github.com/cristhianzl/bearscan/compare/v0.1.0...v0.1.1
|
|
52
75
|
[0.1.0]: https://github.com/cristhianzl/bearscan/releases/tag/v0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bearscan
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Defensive AppSec scanner for code and staging environments you own, mapped to OWASP Top 10 2025 and triaged by an LLM.
|
|
5
5
|
Project-URL: Homepage, https://github.com/cristhianzl/bearscan
|
|
6
6
|
Project-URL: Documentation, https://github.com/cristhianzl/bearscan/tree/main/docs
|
|
@@ -73,9 +73,14 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
73
73
|
- **Secrets, now and in history.** 15 secret detectors with masking everywhere, plus
|
|
74
74
|
[gitleaks and trufflehog](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md#tools-for---path) to find keys in commits you deleted
|
|
75
75
|
long ago. A key found by several tools is reported once.
|
|
76
|
-
- **
|
|
77
|
-
JavaScript/TypeScript, and
|
|
78
|
-
|
|
76
|
+
- **Mapped to every relevant OWASP list.** [47 built-in rules](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md) for secrets,
|
|
77
|
+
JavaScript/TypeScript, Python, and LLM and AI agent applications, plus semgrep's security rulesets. Each
|
|
78
|
+
finding carries its CWE, its OWASP Top 10 2025 category, and, where it applies, the OWASP API Security
|
|
79
|
+
Top 10 2023, LLM Top 10 2025 and 2026, and Agentic Top 10 2026 labels
|
|
80
|
+
([coverage](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md#standards-coverage)).
|
|
81
|
+
- **AI apps and agents.** Catches model output executed as code or rendered as HTML, agents with shell
|
|
82
|
+
tools, `trust_remote_code=True`, pickled models and vector stores, LLM keys shipped to browsers, and user
|
|
83
|
+
input in system prompts.
|
|
79
84
|
- **Vulnerable dependencies.** osv-scanner checks your lockfiles and names the version that fixes each
|
|
80
85
|
advisory.
|
|
81
86
|
- **Staging checks.** `--url` runs testssl.sh (or sslscan) and whatweb for protocols, ciphers,
|
|
@@ -83,9 +88,10 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
83
88
|
- **Triage, not noise.** An [LLM reviewer](https://github.com/cristhianzl/bearscan/blob/main/docs/llm-triage.md) labels each finding *likely real*,
|
|
84
89
|
*false positive*, or *uncertain*, with a confidence, a rationale, and a fix. It can never change a
|
|
85
90
|
severity or hide a finding from the JSON.
|
|
86
|
-
- **
|
|
87
|
-
|
|
88
|
-
`
|
|
91
|
+
- **Everything in one command.** Every supported tool found on `PATH` is used automatically,
|
|
92
|
+
`bearscan setup` installs the missing ones (Homebrew on macOS, apt on [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md)),
|
|
93
|
+
and `bearscan scan --docker` runs all of them inside the official [Kali image](https://github.com/cristhianzl/bearscan/blob/main/docs/docker.md) with
|
|
94
|
+
nothing to install but Docker.
|
|
89
95
|
- **Private by design.** Secrets are masked before anything is printed, saved, or sent, and you can see
|
|
90
96
|
[exactly what leaves your machine](https://github.com/cristhianzl/bearscan/blob/main/docs/security-model.md#what-leaves-your-machine).
|
|
91
97
|
|
|
@@ -104,11 +110,14 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
104
110
|
bearscan scan
|
|
105
111
|
```
|
|
106
112
|
|
|
107
|
-
3. **Go
|
|
108
|
-
semgrep, and
|
|
113
|
+
3. **Go full:** let bearscan install the [external tools](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md) for git history,
|
|
114
|
+
semgrep, dependency, and TLS checks, or run them all from the Kali image instead:
|
|
109
115
|
|
|
110
116
|
```bash
|
|
111
|
-
bearscan
|
|
117
|
+
bearscan setup # installs what is missing, after asking
|
|
118
|
+
bearscan scan # now with every tool
|
|
119
|
+
|
|
120
|
+
bearscan scan --docker # or: no installs, every tool runs inside Kali
|
|
112
121
|
```
|
|
113
122
|
|
|
114
123
|
## Installation
|
|
@@ -119,14 +128,14 @@ pipx install bearscan
|
|
|
119
128
|
uv tool install bearscan
|
|
120
129
|
```
|
|
121
130
|
|
|
122
|
-
|
|
131
|
+
Then add the external tools with one command, on macOS (Homebrew) or Kali, Debian, and Ubuntu (apt):
|
|
123
132
|
|
|
124
133
|
```bash
|
|
125
|
-
|
|
126
|
-
pipx install semgrep
|
|
134
|
+
bearscan setup
|
|
127
135
|
```
|
|
128
136
|
|
|
129
|
-
|
|
137
|
+
Prefer containers? `bearscan scan --docker` uses `ghcr.io/cristhianzl/bearscan`, a Kali image with every
|
|
138
|
+
tool, for amd64 and arm64. Manual installs, reviewers, and upgrades are covered in the
|
|
130
139
|
[installation guide](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md).
|
|
131
140
|
|
|
132
141
|
## Usage
|
|
@@ -139,6 +148,8 @@ bearscan scan --llm ollama # triage with a local model
|
|
|
139
148
|
bearscan scan --no-review # deterministic checks only
|
|
140
149
|
bearscan scan --json > run.json # machine-readable output
|
|
141
150
|
bearscan scan --url https://staging.example.com # TLS, certificate, and server checks
|
|
151
|
+
bearscan scan --docker # every tool, inside the Kali image
|
|
152
|
+
bearscan setup # install the missing tools
|
|
142
153
|
```
|
|
143
154
|
|
|
144
155
|
| Option | Description |
|
|
@@ -149,6 +160,7 @@ bearscan scan --url https://staging.example.com # TLS, certificate, and serve
|
|
|
149
160
|
| `--model`, `--llm-base-url` | Model and endpoint for the reviewer. |
|
|
150
161
|
| `--max-review N` | Most findings sent to the reviewer (default: 60). |
|
|
151
162
|
| `--json` | Print the run as JSON instead of the report. |
|
|
163
|
+
| `--docker` | Run the tools inside the Kali image; the review still runs on your machine. |
|
|
152
164
|
|
|
153
165
|
Every option, environment variable, and exit code is in the [usage guide](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md).
|
|
154
166
|
|
|
@@ -200,7 +212,7 @@ The full picture is in the [security model](https://github.com/cristhianzl/bears
|
|
|
200
212
|
|
|
201
213
|
## Documentation
|
|
202
214
|
|
|
203
|
-
[Installation](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md) · [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md) · [Usage](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md) ·
|
|
215
|
+
[Installation](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md) · [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md) · [Docker](https://github.com/cristhianzl/bearscan/blob/main/docs/docker.md) · [Usage](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md) ·
|
|
204
216
|
[LLM triage](https://github.com/cristhianzl/bearscan/blob/main/docs/llm-triage.md) · [External tools](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md) · [Rules](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md) ·
|
|
205
217
|
[Output format](https://github.com/cristhianzl/bearscan/blob/main/docs/output-format.md) · [Security model](https://github.com/cristhianzl/bearscan/blob/main/docs/security-model.md) ·
|
|
206
218
|
[Architecture](https://github.com/cristhianzl/bearscan/blob/main/docs/architecture.md) · [Troubleshooting](https://github.com/cristhianzl/bearscan/blob/main/docs/troubleshooting.md)
|
|
@@ -40,9 +40,14 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
40
40
|
- **Secrets, now and in history.** 15 secret detectors with masking everywhere, plus
|
|
41
41
|
[gitleaks and trufflehog](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md#tools-for---path) to find keys in commits you deleted
|
|
42
42
|
long ago. A key found by several tools is reported once.
|
|
43
|
-
- **
|
|
44
|
-
JavaScript/TypeScript, and
|
|
45
|
-
|
|
43
|
+
- **Mapped to every relevant OWASP list.** [47 built-in rules](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md) for secrets,
|
|
44
|
+
JavaScript/TypeScript, Python, and LLM and AI agent applications, plus semgrep's security rulesets. Each
|
|
45
|
+
finding carries its CWE, its OWASP Top 10 2025 category, and, where it applies, the OWASP API Security
|
|
46
|
+
Top 10 2023, LLM Top 10 2025 and 2026, and Agentic Top 10 2026 labels
|
|
47
|
+
([coverage](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md#standards-coverage)).
|
|
48
|
+
- **AI apps and agents.** Catches model output executed as code or rendered as HTML, agents with shell
|
|
49
|
+
tools, `trust_remote_code=True`, pickled models and vector stores, LLM keys shipped to browsers, and user
|
|
50
|
+
input in system prompts.
|
|
46
51
|
- **Vulnerable dependencies.** osv-scanner checks your lockfiles and names the version that fixes each
|
|
47
52
|
advisory.
|
|
48
53
|
- **Staging checks.** `--url` runs testssl.sh (or sslscan) and whatweb for protocols, ciphers,
|
|
@@ -50,9 +55,10 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
50
55
|
- **Triage, not noise.** An [LLM reviewer](https://github.com/cristhianzl/bearscan/blob/main/docs/llm-triage.md) labels each finding *likely real*,
|
|
51
56
|
*false positive*, or *uncertain*, with a confidence, a rationale, and a fix. It can never change a
|
|
52
57
|
severity or hide a finding from the JSON.
|
|
53
|
-
- **
|
|
54
|
-
|
|
55
|
-
`
|
|
58
|
+
- **Everything in one command.** Every supported tool found on `PATH` is used automatically,
|
|
59
|
+
`bearscan setup` installs the missing ones (Homebrew on macOS, apt on [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md)),
|
|
60
|
+
and `bearscan scan --docker` runs all of them inside the official [Kali image](https://github.com/cristhianzl/bearscan/blob/main/docs/docker.md) with
|
|
61
|
+
nothing to install but Docker.
|
|
56
62
|
- **Private by design.** Secrets are masked before anything is printed, saved, or sent, and you can see
|
|
57
63
|
[exactly what leaves your machine](https://github.com/cristhianzl/bearscan/blob/main/docs/security-model.md#what-leaves-your-machine).
|
|
58
64
|
|
|
@@ -71,11 +77,14 @@ your existing **Claude Code** or **Codex** login, or fully locally with **Ollama
|
|
|
71
77
|
bearscan scan
|
|
72
78
|
```
|
|
73
79
|
|
|
74
|
-
3. **Go
|
|
75
|
-
semgrep, and
|
|
80
|
+
3. **Go full:** let bearscan install the [external tools](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md) for git history,
|
|
81
|
+
semgrep, dependency, and TLS checks, or run them all from the Kali image instead:
|
|
76
82
|
|
|
77
83
|
```bash
|
|
78
|
-
bearscan
|
|
84
|
+
bearscan setup # installs what is missing, after asking
|
|
85
|
+
bearscan scan # now with every tool
|
|
86
|
+
|
|
87
|
+
bearscan scan --docker # or: no installs, every tool runs inside Kali
|
|
79
88
|
```
|
|
80
89
|
|
|
81
90
|
## Installation
|
|
@@ -86,14 +95,14 @@ pipx install bearscan
|
|
|
86
95
|
uv tool install bearscan
|
|
87
96
|
```
|
|
88
97
|
|
|
89
|
-
|
|
98
|
+
Then add the external tools with one command, on macOS (Homebrew) or Kali, Debian, and Ubuntu (apt):
|
|
90
99
|
|
|
91
100
|
```bash
|
|
92
|
-
|
|
93
|
-
pipx install semgrep
|
|
101
|
+
bearscan setup
|
|
94
102
|
```
|
|
95
103
|
|
|
96
|
-
|
|
104
|
+
Prefer containers? `bearscan scan --docker` uses `ghcr.io/cristhianzl/bearscan`, a Kali image with every
|
|
105
|
+
tool, for amd64 and arm64. Manual installs, reviewers, and upgrades are covered in the
|
|
97
106
|
[installation guide](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md).
|
|
98
107
|
|
|
99
108
|
## Usage
|
|
@@ -106,6 +115,8 @@ bearscan scan --llm ollama # triage with a local model
|
|
|
106
115
|
bearscan scan --no-review # deterministic checks only
|
|
107
116
|
bearscan scan --json > run.json # machine-readable output
|
|
108
117
|
bearscan scan --url https://staging.example.com # TLS, certificate, and server checks
|
|
118
|
+
bearscan scan --docker # every tool, inside the Kali image
|
|
119
|
+
bearscan setup # install the missing tools
|
|
109
120
|
```
|
|
110
121
|
|
|
111
122
|
| Option | Description |
|
|
@@ -116,6 +127,7 @@ bearscan scan --url https://staging.example.com # TLS, certificate, and serve
|
|
|
116
127
|
| `--model`, `--llm-base-url` | Model and endpoint for the reviewer. |
|
|
117
128
|
| `--max-review N` | Most findings sent to the reviewer (default: 60). |
|
|
118
129
|
| `--json` | Print the run as JSON instead of the report. |
|
|
130
|
+
| `--docker` | Run the tools inside the Kali image; the review still runs on your machine. |
|
|
119
131
|
|
|
120
132
|
Every option, environment variable, and exit code is in the [usage guide](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md).
|
|
121
133
|
|
|
@@ -167,7 +179,7 @@ The full picture is in the [security model](https://github.com/cristhianzl/bears
|
|
|
167
179
|
|
|
168
180
|
## Documentation
|
|
169
181
|
|
|
170
|
-
[Installation](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md) · [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md) · [Usage](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md) ·
|
|
182
|
+
[Installation](https://github.com/cristhianzl/bearscan/blob/main/docs/installation.md) · [Kali Linux](https://github.com/cristhianzl/bearscan/blob/main/docs/kali-linux.md) · [Docker](https://github.com/cristhianzl/bearscan/blob/main/docs/docker.md) · [Usage](https://github.com/cristhianzl/bearscan/blob/main/docs/usage.md) ·
|
|
171
183
|
[LLM triage](https://github.com/cristhianzl/bearscan/blob/main/docs/llm-triage.md) · [External tools](https://github.com/cristhianzl/bearscan/blob/main/docs/external-tools.md) · [Rules](https://github.com/cristhianzl/bearscan/blob/main/docs/rules.md) ·
|
|
172
184
|
[Output format](https://github.com/cristhianzl/bearscan/blob/main/docs/output-format.md) · [Security model](https://github.com/cristhianzl/bearscan/blob/main/docs/security-model.md) ·
|
|
173
185
|
[Architecture](https://github.com/cristhianzl/bearscan/blob/main/docs/architecture.md) · [Troubleshooting](https://github.com/cristhianzl/bearscan/blob/main/docs/troubleshooting.md)
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|---|---|
|
|
5
5
|
| [Installation](installation.md) | Installing bearscan, an LLM reviewer, and the external tools on Linux and macOS. |
|
|
6
6
|
| [Kali Linux guide](kali-linux.md) | From a fresh Kali install to a full scan with every tool. |
|
|
7
|
+
| [Docker](docker.md) | `bearscan scan --docker` and the official Kali image with every tool installed. |
|
|
7
8
|
| [Usage](usage.md) | Commands, options, environment variables, the report, exit codes, and saved runs. |
|
|
8
9
|
| [LLM triage](llm-triage.md) | Claude Code, Codex, Ollama, and LiteLLM backends, verdicts, and what reaches the model. |
|
|
9
10
|
| [External tools](external-tools.md) | What gitleaks, trufflehog, semgrep, osv-scanner, testssl.sh, sslscan, and whatweb add, and how. |
|
|
10
|
-
| [Built-in rules](rules.md) | The
|
|
11
|
+
| [Built-in rules](rules.md) | The 47 rules, their severities, and their CWE, OWASP Top 10 2025, API Security 2023, LLM 2025 and 2026, and Agentic 2026 mappings. |
|
|
11
12
|
| [Output format](output-format.md) | The JSON run format and its [schema](schema/scan-run.schema.json). |
|
|
12
13
|
| [Security model](security-model.md) | What leaves your machine, how secrets are handled, and how the reviewer is protected. |
|
|
13
14
|
| [Architecture](architecture.md) | The pipeline, the modules, and the design decisions behind them. |
|
|
@@ -30,19 +30,25 @@ For `--path`:
|
|
|
30
30
|
3. **Run external tools.** Each installed tool runs in a private temporary directory with a timeout. Its
|
|
31
31
|
machine-readable output is parsed with typed models and converted into findings. A missing tool is
|
|
32
32
|
reported, a failed tool is warned about, and neither stops the run.
|
|
33
|
-
4. **Merge.** Findings are deduplicated by fingerprint (secrets by file and value)
|
|
34
|
-
|
|
33
|
+
4. **Merge.** Findings are deduplicated by fingerprint (secrets by file and value). On one line and CWE,
|
|
34
|
+
the most targeted built-in finding is kept, and semgrep results already covered by a built-in rule are
|
|
35
|
+
dropped.
|
|
35
36
|
5. **Review.** Findings with code context go to the reviewer in batches of 20. Dependency findings skip it.
|
|
36
37
|
6. **Report.** The run is printed (or emitted as JSON) and saved with private file permissions.
|
|
37
38
|
|
|
38
39
|
For `--url`, steps 3, 4, and 6 run with the URL tools; there is no review step.
|
|
39
40
|
|
|
41
|
+
With `--docker`, steps 1 to 4 run inside the official Kali image (`bearscan scan --no-review --json` with the
|
|
42
|
+
repository mounted read-only), and the host runs steps 5 and 6 on the returned findings. The review stage is
|
|
43
|
+
the same function either way.
|
|
44
|
+
|
|
40
45
|
## Modules
|
|
41
46
|
|
|
42
47
|
| Package | Responsibility |
|
|
43
48
|
|---|---|
|
|
44
49
|
| `bearscan.cli` | Typer command, option validation, and the live progress display. |
|
|
45
|
-
| `bearscan.agents` | `orchestrator` runs the pipeline; `reviewer` batches findings for the LLM and applies the verdicts; `prompts` holds the reviewer instructions and JSON schema. |
|
|
50
|
+
| `bearscan.agents` | `orchestrator` runs the pipeline; `container` runs it inside the Kali image for `--docker`; `reviewer` batches findings for the LLM and applies the verdicts; `prompts` holds the reviewer instructions and JSON schema. |
|
|
51
|
+
| `bearscan.installer` | `bearscan setup`: install recipes per tool, the plan for the current system, and the verified osv-scanner download. |
|
|
46
52
|
| `bearscan.checks` | Rule loading and validation, the line engine, file collection, secret masking helpers, and the evidence reader that serves masked context to tool adapters. |
|
|
47
53
|
| `bearscan.adapters` | One module per external tool, plus detection on `PATH` (`execution`), the registry of tools per target type, and shared mappings (OWASP 2021 to 2025, CWE, CVSS). |
|
|
48
54
|
| `bearscan.llm` | Providers behind one small protocol: Claude Code, Codex, Ollama, and OpenAI-compatible endpoints. |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Docker and the Kali image
|
|
2
|
+
|
|
3
|
+
Every release publishes a Kali Linux image with bearscan and all seven external tools installed:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
ghcr.io/cristhianzl/bearscan:<version> # for example 0.2.0
|
|
7
|
+
ghcr.io/cristhianzl/bearscan:latest
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The image is built for `linux/amd64` and `linux/arm64`, so it runs natively on Intel and Apple Silicon
|
|
11
|
+
machines. It is about 1.6 GB.
|
|
12
|
+
|
|
13
|
+
## `bearscan scan --docker`
|
|
14
|
+
|
|
15
|
+
The easiest way to get the full audit without installing any tool:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bearscan scan --docker # the current directory
|
|
19
|
+
bearscan scan --docker --path ~/code/my-repo # another repository
|
|
20
|
+
bearscan scan --docker --url https://staging.example.com
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
What happens:
|
|
24
|
+
|
|
25
|
+
1. bearscan starts `ghcr.io/cristhianzl/bearscan:<your bearscan version>`. Docker downloads it on the first
|
|
26
|
+
run and reuses it afterwards.
|
|
27
|
+
2. Your repository is mounted **read-only** at `/scan`, and the container runs the built-in rules plus
|
|
28
|
+
gitleaks, trufflehog, semgrep, and osv-scanner (or testssl.sh, sslscan, and whatweb for `--url`).
|
|
29
|
+
3. The container returns its findings as JSON and exits.
|
|
30
|
+
4. The **LLM review runs on your machine**, with your own Claude Code, Codex, Ollama, or LiteLLM setup.
|
|
31
|
+
Your LLM credentials never enter the container.
|
|
32
|
+
5. bearscan prints the report and saves the run, exactly as without `--docker`.
|
|
33
|
+
|
|
34
|
+
All other options work the same way (`--no-review`, `--llm`, `--json`, and so on).
|
|
35
|
+
|
|
36
|
+
### Choosing the image
|
|
37
|
+
|
|
38
|
+
bearscan uses the image tag that matches its own version. To use another image, such as one you built
|
|
39
|
+
yourself, set `BEARSCAN_DOCKER_IMAGE`:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
BEARSCAN_DOCKER_IMAGE=ghcr.io/cristhianzl/bearscan:latest bearscan scan --docker
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Scanning a URL on your own machine
|
|
46
|
+
|
|
47
|
+
Inside the container, `localhost` is the container itself. To check a service running on your machine, use
|
|
48
|
+
`host.docker.internal` (Docker Desktop on macOS and Windows), or run bearscan without `--docker`.
|
|
49
|
+
|
|
50
|
+
## Running the image directly
|
|
51
|
+
|
|
52
|
+
You do not need bearscan installed on the host to use the image:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
docker run --rm -v "$PWD:/scan:ro" ghcr.io/cristhianzl/bearscan scan --no-review
|
|
56
|
+
docker run --rm ghcr.io/cristhianzl/bearscan scan --url https://staging.example.com
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Without a reviewer inside the container, these runs are deterministic only. Use `bearscan scan --docker`
|
|
60
|
+
from the host to add LLM triage.
|
|
61
|
+
|
|
62
|
+
## What is inside
|
|
63
|
+
|
|
64
|
+
| Component | Source |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Kali Linux rolling | `kalilinux/kali-rolling` |
|
|
67
|
+
| gitleaks, trufflehog, testssl.sh, sslscan, whatweb | Kali packages |
|
|
68
|
+
| semgrep | `pipx install semgrep` |
|
|
69
|
+
| osv-scanner | GitHub release binary, verified against its published SHA-256 |
|
|
70
|
+
| bearscan | built from the release tag |
|
|
71
|
+
|
|
72
|
+
Git inside the image trusts every mounted directory (`safe.directory = *`), because mounted repositories
|
|
73
|
+
belong to your host user.
|
|
74
|
+
|
|
75
|
+
## Building it yourself
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
docker build -t bearscan:local .
|
|
79
|
+
BEARSCAN_DOCKER_IMAGE=bearscan:local bearscan scan --docker
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`tests/e2e/kali_smoke.sh <image>` checks that every tool runs against real inputs; the
|
|
83
|
+
[Docker workflow](../.github/workflows/docker.yml) runs it on every change and once a week, which catches a
|
|
84
|
+
tool whose output format changed.
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
bearscan wraps well-known open-source security tools. At every run it looks for each one on `PATH`, runs
|
|
4
4
|
the ones it finds, and converts their output into bearscan findings with the same severity scale, CWE, and
|
|
5
5
|
OWASP Top 10 2025 labels as the built-in rules. Nothing needs to be configured: install a tool and the next
|
|
6
|
-
run uses it.
|
|
6
|
+
run uses it. `bearscan setup` installs the missing ones for you, and `bearscan scan --docker` runs all of them
|
|
7
|
+
inside the official Kali image without installing anything (see [Docker](docker.md)).
|
|
7
8
|
|
|
8
9
|
- [Tools for `--path`](#tools-for---path)
|
|
9
10
|
- [Tools for `--url`](#tools-for---url)
|
|
@@ -11,6 +12,11 @@ run uses it.
|
|
|
11
12
|
- [Merging duplicates](#merging-duplicates)
|
|
12
13
|
- [Network use](#network-use)
|
|
13
14
|
|
|
15
|
+
Findings from these tools also carry extra OWASP labels where they apply: secrets found by gitleaks and
|
|
16
|
+
trufflehog are labeled `API2:2023`, semgrep results get labels derived from their CWE (for example CWE-918 to
|
|
17
|
+
`API7:2023`), and every `--url` finding is labeled `API8:2023`. See
|
|
18
|
+
[standards coverage](rules.md#standards-coverage).
|
|
19
|
+
|
|
14
20
|
## Tools for `--path`
|
|
15
21
|
|
|
16
22
|
### gitleaks: secrets in git history
|
|
@@ -121,6 +127,9 @@ Timeouts are 15 minutes for gitleaks, trufflehog, and osv-scanner, 30 minutes fo
|
|
|
121
127
|
*Secret in git history* finding.
|
|
122
128
|
- **Code:** a semgrep result on the same file, line, and CWE as a built-in finding is dropped in favor of
|
|
123
129
|
the built-in one, which carries a remediation written for that exact pattern.
|
|
130
|
+
- **Built-in rules:** when a generic rule and a targeted one flag the same line with the same CWE (for
|
|
131
|
+
example `py.dynamic-code` and `llm.output-to-code-execution` on `exec(completion...)`), only the targeted
|
|
132
|
+
finding is kept.
|
|
124
133
|
|
|
125
134
|
## Network use
|
|
126
135
|
|
|
@@ -24,7 +24,7 @@ Every [GitHub release](https://github.com/cristhianzl/bearscan/releases/latest)
|
|
|
24
24
|
the source archive, and a `SHA256SUMS` file, and you can install straight from a tag:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
pipx install git+https://github.com/cristhianzl/bearscan.git@v0.
|
|
27
|
+
pipx install git+https://github.com/cristhianzl/bearscan.git@v0.2.0
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Check the install:
|
|
@@ -61,10 +61,35 @@ findings, set up one of these backends. See [LLM triage](llm-triage.md) for how
|
|
|
61
61
|
|
|
62
62
|
## Add external tools
|
|
63
63
|
|
|
64
|
-
Each tool adds coverage when it is on `PATH`.
|
|
65
|
-
|
|
64
|
+
Each tool adds coverage when it is on `PATH`. See [External tools](external-tools.md) for what each one
|
|
65
|
+
contributes. There are three ways to get them.
|
|
66
66
|
|
|
67
|
-
###
|
|
67
|
+
### Let bearscan install them
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
bearscan setup # shows the plan, asks, then installs what is missing
|
|
71
|
+
bearscan setup --dry-run # only show the plan
|
|
72
|
+
bearscan setup --yes # install without asking
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`bearscan setup` detects your system and installs only the missing tools:
|
|
76
|
+
|
|
77
|
+
| System | How |
|
|
78
|
+
|---|---|
|
|
79
|
+
| macOS with Homebrew | one `brew install` for every missing tool |
|
|
80
|
+
| Kali, Debian, or Ubuntu | `sudo apt-get install` for packaged tools, `pipx install semgrep` (or `uv tool install`), and the osv-scanner release binary in `~/.local/bin`, verified against its published SHA-256 |
|
|
81
|
+
| Anything else | prints the manual install command for each tool |
|
|
82
|
+
|
|
83
|
+
Tools your distribution does not package are listed with their manual install command.
|
|
84
|
+
|
|
85
|
+
### Use the Kali image instead
|
|
86
|
+
|
|
87
|
+
With Docker installed, `bearscan scan --docker` runs every tool inside the official Kali image, and nothing
|
|
88
|
+
else needs to be installed. See [Docker](docker.md).
|
|
89
|
+
|
|
90
|
+
### Install them by hand
|
|
91
|
+
|
|
92
|
+
#### Kali Linux
|
|
68
93
|
|
|
69
94
|
```bash
|
|
70
95
|
sudo apt install -y gitleaks trufflehog testssl.sh sslscan whatweb
|
|
@@ -81,13 +106,13 @@ curl -fsSLo ~/.local/bin/osv-scanner \
|
|
|
81
106
|
chmod +x ~/.local/bin/osv-scanner
|
|
82
107
|
```
|
|
83
108
|
|
|
84
|
-
|
|
109
|
+
#### macOS
|
|
85
110
|
|
|
86
111
|
```bash
|
|
87
112
|
brew install gitleaks trufflehog semgrep osv-scanner testssl sslscan whatweb
|
|
88
113
|
```
|
|
89
114
|
|
|
90
|
-
|
|
115
|
+
#### Other Linux distributions
|
|
91
116
|
|
|
92
117
|
Use your package manager where the tool is packaged, `pipx install semgrep` for semgrep, and the release
|
|
93
118
|
binaries from each project for gitleaks, trufflehog, and osv-scanner.
|
|
@@ -19,6 +19,15 @@ bearscan needs Python 3.12 or newer; it has been tested with the Python 3.14 tha
|
|
|
19
19
|
|
|
20
20
|
## 2. Install the external tools
|
|
21
21
|
|
|
22
|
+
Let bearscan install everything that is missing (it asks for your sudo password for `apt-get`):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bearscan setup
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
It runs `apt-get install` for gitleaks, trufflehog, testssl.sh, sslscan, and whatweb, `pipx install semgrep`,
|
|
29
|
+
and downloads osv-scanner into `~/.local/bin` after checking its SHA-256. To do the same by hand:
|
|
30
|
+
|
|
22
31
|
```bash
|
|
23
32
|
sudo apt install -y gitleaks trufflehog testssl.sh sslscan whatweb
|
|
24
33
|
pipx install semgrep
|
|
@@ -39,6 +39,7 @@ The schema may gain fields in minor releases; consumers should ignore fields the
|
|
|
39
39
|
| `location` | object | `path` (relative to the repository, or the URL), `line`, and `column`, both starting at 1. |
|
|
40
40
|
| `evidence` | object | `snippet` (the masked flagged line), `context` (masked surrounding lines), and `context_start` (line number of the first context line). |
|
|
41
41
|
| `remediation` | string | What to do about it. |
|
|
42
|
+
| `standards` | array of string | Other OWASP labels that apply, such as `API8:2023`, `LLM05:2025`, `LLM10:2026`, or `ASI05:2026`. Empty when none apply. See [standards coverage](rules.md#standards-coverage). |
|
|
42
43
|
| `review` | object or null | The reviewer's verdict, described below, or `null` when not reviewed. |
|
|
43
44
|
|
|
44
45
|
### Review
|