break-anything 0.1.0 → 0.2.0
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.
- package/README.md +126 -155
- package/bin/brk.js +21 -2
- package/docs/assets/hero.gif +0 -0
- package/docs/hero-gif.md +32 -34
- package/docs/launch.md +68 -80
- package/docs/mcp-tools.md +176 -33
- package/docs/readme/README_zh.md +89 -126
- package/docs/roadmap.md +51 -0
- package/package.json +5 -5
- package/src/http.js +1 -1
- package/src/mcp.js +21 -1
- package/src/report.js +141 -40
- package/src/sast.js +128 -0
package/README.md
CHANGED
|
@@ -4,249 +4,220 @@
|
|
|
4
4
|
|
|
5
5
|
# Break Anything
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### You think your service is secure. You've never seen it the way an attacker would.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Break Anything points your coding agent at your own code, apps, and infrastructure and hunts them
|
|
10
|
+
**like an attacker** — surfacing what's genuinely exploitable, proving it on your own build, and
|
|
11
|
+
fixing it. Before someone else finds it first.
|
|
12
|
+
|
|
13
|
+
*See your own service through an attacker's eyes.*
|
|
10
14
|
|
|
11
15
|
[](https://www.npmjs.com/package/break-anything)
|
|
12
16
|
[](docs/mcp-tools.md)
|
|
13
17
|
[](DISCLAIMER.md)
|
|
14
18
|
[](LICENSE)
|
|
15
19
|
|
|
16
|
-
**[Quick start](#quick-start) · [
|
|
20
|
+
**[Quick start](#quick-start) · [Why it's different](#why-its-different) · [See it in 30s](#see-it-in-30-seconds) · [The arsenal](#the-arsenal) · [FAQ](#faq)**
|
|
17
21
|
|
|
18
22
|
<code>npx break-anything setup</code>
|
|
19
23
|
|
|
20
24
|
</div>
|
|
21
25
|
|
|
22
26
|
> [!IMPORTANT]
|
|
23
|
-
> Break Anything
|
|
24
|
-
>
|
|
25
|
-
>
|
|
26
|
-
> It is not an attack framework and must not be pointed at third-party systems.
|
|
27
|
-
|
|
28
|
-
> [!WARNING]
|
|
29
|
-
> Get Break Anything only from the official sources listed in this README and in the
|
|
30
|
-
> `break-anything` npm package. A similar repository name or a copied README does not
|
|
31
|
-
> make a download official.
|
|
27
|
+
> Break Anything tests software **you own or are explicitly authorized to test**. Every
|
|
28
|
+
> proof-of-concept runs against your own target. It's a defensive tool, not an attack framework,
|
|
29
|
+
> and must never be pointed at third-party systems.
|
|
32
30
|
|
|
33
31
|
<div align="center">
|
|
34
32
|
|
|
35
|
-
<!-- Record with:
|
|
36
|
-
<img src="docs/assets/hero.gif" alt="Break Anything
|
|
33
|
+
<!-- Record with: vhs demos/hero.tape -->
|
|
34
|
+
<img src="docs/assets/hero.gif" alt="Break Anything: which vulnerabilities actually reach your code, plus a secret hiding in git history" width="900" />
|
|
37
35
|
|
|
38
36
|
</div>
|
|
39
37
|
|
|
40
38
|
---
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
[Patch Anything](#companion-patch-anything).
|
|
40
|
+
"It's probably fine." It shipped, it works, nobody has complained — so you assume it's secure. But
|
|
41
|
+
"no breach yet" was never a security test. The only honest one is to look at your own service the
|
|
42
|
+
way an attacker will: which dependency is an open door, what key is still in your git history,
|
|
43
|
+
which endpoint hands over another user's data.
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
the
|
|
45
|
+
And you're never done. A critical unauthenticated RCE turned up in PHP itself in October 2026 after
|
|
46
|
+
years in plain sight (php2shell) — if the language behind much of the web still has critical holes,
|
|
47
|
+
so does your app. Every dependency you add widens the surface, and you can't close them all. So fix
|
|
48
|
+
the few an attacker can reach *today*.
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
proof-of-concept against **your own** target, and — when upstream has no fix — proposes a patch,
|
|
56
|
-
a shim, or a mitigation so an abandoned dependency does not become your breach.
|
|
57
|
-
|
|
58
|
-
## Quick start
|
|
50
|
+
And the economics just flipped: the same AI agents that write code now hunt vulnerabilities at
|
|
51
|
+
scale — and attackers have them too. Find your holes first, with the same leverage.
|
|
59
52
|
|
|
60
|
-
|
|
53
|
+
**Break Anything gives your coding agent that attacker's-eye view** — in one sentence, on software
|
|
54
|
+
you own: what's genuinely exploitable, proven on *your* build, with the fix. Everything runs
|
|
55
|
+
locally. Nothing is pointed anywhere you don't own.
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
## Quick start
|
|
63
58
|
|
|
64
59
|
```bash
|
|
65
60
|
npx break-anything setup
|
|
66
61
|
```
|
|
67
62
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
configuration. Restart your agent afterward.
|
|
63
|
+
Pick your agent, approve the changes, restart. Works with Claude Code, Codex, Cursor, Gemini CLI,
|
|
64
|
+
Windsurf, and anything that runs a local MCP server. Then just ask:
|
|
71
65
|
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
```text
|
|
67
|
+
Use Break Anything on this project. Show me only the vulnerabilities that are
|
|
68
|
+
actually reachable in my code, prove the worst one, and give me the fix.
|
|
69
|
+
```
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
Prefer the terminal? One command, shipped today:
|
|
76
72
|
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
```bash
|
|
74
|
+
npx -y break-anything deps ./ # dependency CVEs, ranked by reachability + EPSS
|
|
75
|
+
npx -y break-anything secrets ./ --history # leaked keys in the tree and full git history
|
|
76
|
+
npx -y break-anything image my-svc:latest # OS + app CVEs in a container image
|
|
77
|
+
npx -y break-anything sast ./src # static code analysis (injection, authz, SSRF…)
|
|
81
78
|
```
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
container image, or a Terraform directory.
|
|
80
|
+
## Why it's different
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
Every scanner can hand you a list. The list is the problem. Break Anything is built around the
|
|
83
|
+
three things a list can't do:
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
- **Reachability — it thinks like an attacker.** An attacker doesn't work through 400 theoretical
|
|
86
|
+
CVEs; they go straight for the few they can actually reach. Break Anything does the same:
|
|
87
|
+
`confirmed` → `reachable` → `present` → `not-reachable`. The vulnerable `lodash` you never call
|
|
88
|
+
is noise; the one on a live code path is the finding. You triage 3, not 400.
|
|
89
|
+
- **Proof, not prose.** Instead of a CVSS paragraph, it builds a proof-of-concept against *your*
|
|
90
|
+
build — the exact input or request that breaks it — so "theoretically vulnerable" becomes
|
|
91
|
+
"here's the repro."
|
|
92
|
+
- **A fix, even when upstream is gone.** No patched version because the maintainer vanished? It
|
|
93
|
+
proposes a patch, a pin, a compatibility shim, or a maintained fork — so an abandoned dependency
|
|
94
|
+
doesn't become your breach. Hand it to [Patch Anything](#companion-patch-anything) for a
|
|
95
|
+
merge-ready PR.
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
It doesn't replace OSV, Trivy, Semgrep or ZAP — it **orchestrates** them behind one agent
|
|
98
|
+
interface and does the reasoning they can't.
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
npx -y break-anything image my-service:latest
|
|
97
|
-
```
|
|
100
|
+
## See it in 30 seconds
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
> [tool catalog](docs/mcp-tools.md) is the roadmap, landing incrementally.
|
|
102
|
+
Three things you'll reach for it, each one sentence to your agent:
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
| The moment | Ask | What you get back |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| **"A CVE is trending — are we hit?"** | *"Scan my deps, only flag what's reachable."* | 3 reachable CVEs with fix versions — not a 400-line wall |
|
|
107
|
+
| **"Did someone commit a key?"** | *"Scan the repo and git history for secrets."* | The leaked key, the commit that introduced it, "rotate don't delete" |
|
|
108
|
+
| **"Can user A read user B's data?"** | *"Check /orders/:id for broken access control."* | The IDOR, proven against localhost with two accounts |
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
## What you point it at
|
|
111
|
+
|
|
112
|
+
You don't pick a mode. Hand it whatever you have — it detects the form and routes to the right
|
|
113
|
+
engine.
|
|
108
114
|
|
|
109
|
-
|
|
115
|
+
| You give it | Form | Categories |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| A repo or source tree | source / tech stack | SCA, SAST, Secrets |
|
|
118
|
+
| A lockfile (`package-lock.json`, `composer.lock`, `go.mod`…) | manifest | SCA |
|
|
119
|
+
| A container image | build artifact | Containers |
|
|
120
|
+
| An APK / IPA or compiled binary | build artifact | Mobile, Fuzzing |
|
|
121
|
+
| A Terraform / Kubernetes / Dockerfile | config | IaC |
|
|
122
|
+
| A running URL or API (yours) | live system | DAST, API |
|
|
123
|
+
| Cloud credentials (yours) | live account | Cloud posture |
|
|
124
|
+
| Git history | repo metadata | Secrets |
|
|
110
125
|
|
|
111
|
-
|
|
126
|
+
## The arsenal
|
|
112
127
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```
|
|
128
|
+
Organized by scan category — the language security teams speak — each orchestrating tools that
|
|
129
|
+
already run in real pipelines. ✅ shipped in 0.1.0 · 🧭 on the roadmap.
|
|
116
130
|
|
|
117
|
-
|
|
131
|
+
### ✅ Shipped today
|
|
118
132
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
- **Dependencies (SCA)** — known CVEs across your whole tree, ranked by reachability + EPSS, with fix versions. Engines: [OSV](https://osv.dev), [Trivy](https://github.com/aquasecurity/trivy), [Grype](https://github.com/anchore/grype), `pip-audit`, `govulncheck`, `composer audit`. Ecosystems: npm, PyPI, Composer, Go, Maven, Cargo, RubyGems, NuGet.
|
|
134
|
+
- **Secrets** — leaked keys/tokens/private keys in the working tree and full git history, redacted. Engines: [Gitleaks](https://github.com/gitleaks/gitleaks), [TruffleHog](https://github.com/trufflesecurity/trufflehog).
|
|
135
|
+
- **Container images** — OS + app CVEs, Dockerfile smells, secrets in layers. Engines: [Trivy](https://github.com/aquasecurity/trivy), [Grype](https://github.com/anchore/grype), [Hadolint](https://github.com/hadolint/hadolint).
|
|
136
|
+
- **Static code (SAST)** — injection, broken access control, insecure deserialization, SSRF, hardcoded secrets — each with file/line, CWE/OWASP tags, and the offending snippet. Engine: [Semgrep](https://semgrep.dev).
|
|
122
137
|
|
|
123
|
-
|
|
138
|
+
### 🧭 On the roadmap
|
|
124
139
|
|
|
125
|
-
|
|
140
|
+
- **More SAST engines** — [CodeQL](https://codeql.github.com), SonarQube CE, Bandit (Python), gosec (Go), Brakeman (Rails), Find-Sec-Bugs (Java), security-code-scan (.NET), retire.js (frontend JS).
|
|
141
|
+
- **Infrastructure & Kubernetes (IaC)** — public buckets, open ports, over-broad IAM, misconfigured clusters — before `apply`. [Checkov](https://www.checkov.io), tfsec, Terrascan, [KICS](https://kics.io), [Kubescape](https://github.com/kubescape/kubescape), kube-bench, [Falco](https://falco.org) (runtime).
|
|
142
|
+
- **Running apps & attack surface (DAST)** — OWASP Top 10, content/parameter discovery, XSS, injection against your authorized app. [OWASP ZAP](https://www.zaproxy.org), [Nuclei](https://github.com/projectdiscovery/nuclei), [Nikto](https://github.com/sullo/nikto), [ffuf](https://github.com/ffuf/ffuf), [Katana](https://github.com/projectdiscovery/katana), [Dalfox](https://github.com/hahwul/dalfox), [sqlmap](https://sqlmap.org); surface mapping via [Nmap](https://nmap.org) + [Amass](https://github.com/owasp-amass/amass) + ProjectDiscovery.
|
|
143
|
+
- **API** — BOLA/IDOR, broken auth, mass assignment (OWASP API Top 10). [Schemathesis](https://github.com/schemathesis/schemathesis), ZAP.
|
|
144
|
+
- **Offensive / exploitation** — *authorized pentest only; gated, off by default, written permission required.* Prove exploitability on targets you own. [Metasploit](https://www.metasploit.com), sqlmap, [Hydra](https://github.com/vanhauser-thc/thc-hydra), [Hashcat](https://hashcat.net), [BloodHound](https://github.com/SpecterOps/BloodHound) + Impacket (Active Directory), [OpenVAS](https://www.openvas.org).
|
|
145
|
+
- **AI / LLM security** — prompt injection, jailbreaks, data leakage in your own models and agents. [Garak](https://github.com/NVIDIA/garak).
|
|
146
|
+
- **Binary & artifact analysis** — known-vulnerable deps and unsafe patterns in compiled binaries. [Ghidra](https://ghidra-sre.org), [radare2](https://github.com/radareorg/radare2), [angr](https://github.com/angr/angr) (pairs with REA).
|
|
147
|
+
- **Cloud posture · Smart contracts · Mobile · Fuzzing** — [Prowler](https://github.com/prowler-cloud/prowler) · [Slither](https://github.com/crytic/slither), Mythril, Echidna · [MobSF](https://github.com/MobSF/Mobile-Security-Framework-MobSF) · [AFL++](https://github.com/AFLplusplus/AFLplusplus), libFuzzer, Jazzer.
|
|
126
148
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
| **Find** | Enumerate weaknesses across dependencies, source, running app, and infrastructure. |
|
|
130
|
-
| **Prove** | Confirm the finding is reachable in your usage and build a proof-of-concept against *your* target. |
|
|
131
|
-
| **Fix** | Produce a patch, pin, shim, or mitigation — directly, or by handing off to Patch Anything. |
|
|
149
|
+
Full per-tool catalog and MCP contracts: [docs/mcp-tools.md](docs/mcp-tools.md). Every dynamic
|
|
150
|
+
(traffic-sending) category is **off by default** and refuses any target not on your allowlist.
|
|
132
151
|
|
|
133
|
-
|
|
134
|
-
"reachable but unproven", and "present but not reachable" instead of drowning you in noise.
|
|
152
|
+
## How it works
|
|
135
153
|
|
|
136
|
-
|
|
154
|
+
Your agent calls Break Anything over MCP to inspect a target you control. It routes to the right
|
|
155
|
+
engine, confirms reachability, and returns each finding with its evidence and a fix. The CLI uses
|
|
156
|
+
the same workflows.
|
|
137
157
|
|
|
138
|
-
|
|
139
|
-
| --- | --- | --- |
|
|
140
|
-
| Dependency manifests | Known CVEs across `package-lock`, `requirements.txt`, `go.mod`, `composer.lock`, `pom.xml`, `Cargo.toml`; EPSS exploit probability; CISA KEV status; fix versions; call-path reachability | OSV / GHSA (built-in); reachability uses local source |
|
|
141
|
-
| Source code | Injection, broken access control, insecure deserialization, path traversal, SSRF, hardcoded secrets — with data-flow evidence | Semgrep / CodeQL rulepacks |
|
|
142
|
-
| Secrets in repo + git history | Exposed API keys, tokens, private keys, and where they leaked | gitleaks / trufflehog style scan |
|
|
143
|
-
| Running web app (your host) | OWASP Top 10 dynamic findings against an authorized localhost or staging target | A Chrome-family browser; OWASP ZAP |
|
|
144
|
-
| HTTP APIs (your host) | Broken access control, IDOR, auth bypass, mass assignment — with a reproducible request | Authorized base URL + credentials |
|
|
145
|
-
| Container images | OS and application-layer CVEs, misconfigurations, exposed secrets in layers | Trivy / Grype |
|
|
146
|
-
| Dockerfile / IaC | Misconfigurations in Dockerfile, Terraform, Kubernetes, CloudFormation | Trivy / checkov rulepacks |
|
|
147
|
-
| Web frontend bundles | Vulnerable JS libraries and secrets shipped to the browser | Node.js + npm |
|
|
148
|
-
| Compiled artifacts | Known-vulnerable bundled dependencies and memory-safety smells | Static inspection |
|
|
149
|
-
| Smart contracts (optional) | Reentrancy, integer overflow, access-control gaps in Solidity | Slither |
|
|
150
|
-
|
|
151
|
-
Every dynamic capability is **disabled by default** and requires both an operator policy and an
|
|
152
|
-
explicit per-run authorization flag. Static inspection reads your files without running them.
|
|
153
|
-
|
|
154
|
-
## Showcases
|
|
155
|
-
|
|
156
|
-
Ten worked demos — **all on targets you own, open-source projects, or deliberately vulnerable
|
|
157
|
-
labs**. See [`demos/`](demos/) for the full scripts.
|
|
158
|
-
|
|
159
|
-
1. **OWASP Juice Shop** — point at the authorized lab, find an IDOR, prove it with a request, explain the fix.
|
|
160
|
-
2. **The dependency you forgot** — an old `lodash`/`minimist` in your lockfile: find it, confirm the vulnerable function is actually called, get the fix version.
|
|
161
|
-
3. **PHP supply chain after php2shell** — a PHP project pinned to a vulnerable `composer` dependency: Break Anything maps your whole dependency chain so the *next* php2shell does not catch you blind.
|
|
162
|
-
4. **Log4Shell lab** — a Java service with a vulnerable `log4j`: confirm reachability through your logging path, not just presence.
|
|
163
|
-
5. **Leaked key** — a test repo with an AWS key committed three months ago: find it in history, show the blast radius.
|
|
164
|
-
6. **Vulnerable base image** — a `Dockerfile` on an outdated base: list OS + app CVEs and the minimal bump.
|
|
165
|
-
7. **Public bucket** — a Terraform file that makes an S3 bucket world-readable: catch it before `apply`.
|
|
166
|
-
8. **Your own Express API** — an IDOR on `/orders/:id`: prove it against localhost with two accounts.
|
|
167
|
-
9. **Reentrancy** — a Solidity contract in a lab: trace the external call before the state update.
|
|
168
|
-
10. **Find → Fix handoff** — hand any finding above to [Patch Anything](#companion-patch-anything) and watch the fix PR get drafted.
|
|
169
|
-
|
|
170
|
-
If you break something interesting (that you are allowed to break), open an issue or PR with the
|
|
171
|
-
target, your question, and what you found.
|
|
158
|
+

|
|
172
159
|
|
|
173
|
-
|
|
160
|
+
**Find** weaknesses across deps, code, secrets, images, IaC, and running apps → **Prove** the
|
|
161
|
+
finding is reachable with a PoC against your target → **Fix** it inline or via Patch Anything.
|
|
162
|
+
Absence of a finding is never reported as proof of safety.
|
|
174
163
|
|
|
175
|
-
|
|
176
|
-
work as a pair:
|
|
164
|
+
## Companion: Patch Anything
|
|
177
165
|
|
|
178
|
-
> **Break Anything** finds it and proves it → **Patch Anything** fixes it.
|
|
166
|
+
> **Break Anything** finds it and proves it → **[Patch Anything](https://github.com/EnkiHQ/patch-anything)** fixes it.
|
|
179
167
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
maintained fork or local mitigation. One is offense-flavoured discovery; the other is defensive
|
|
183
|
-
repair. Use either alone, or run the loop end to end.
|
|
168
|
+
Hand any finding over and it drafts the patch, bump, shim, or fork. Discovery and repair, one
|
|
169
|
+
loop. Use either alone, or run it end to end.
|
|
184
170
|
|
|
185
171
|
## FAQ
|
|
186
172
|
|
|
187
173
|
<details>
|
|
188
|
-
<summary><strong>
|
|
174
|
+
<summary><strong>How is this different from `npm audit` / Trivy / Snyk?</strong></summary>
|
|
189
175
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
176
|
+
They report presence — every vulnerability that exists anywhere in your tree. Break Anything adds
|
|
177
|
+
**reachability** (is it actually called), **proof** (a PoC against your own build), and
|
|
178
|
+
**self-remediation** when upstream has no fix, and unifies deps, code, secrets, images, IaC, and
|
|
179
|
+
runtime behind one agent interface.
|
|
194
180
|
|
|
195
181
|
</details>
|
|
196
182
|
|
|
197
183
|
<details>
|
|
198
|
-
<summary><strong>
|
|
184
|
+
<summary><strong>Does it replace those tools?</strong></summary>
|
|
199
185
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
upstream has no fix. It also unifies dependency, source, runtime, and infrastructure findings
|
|
203
|
-
behind one agent interface.
|
|
186
|
+
No — it orchestrates them. Break Anything is the brain and the interface; OSV, Trivy, Semgrep, ZAP
|
|
187
|
+
are the engines. You get their depth without learning each one.
|
|
204
188
|
|
|
205
189
|
</details>
|
|
206
190
|
|
|
207
191
|
<details>
|
|
208
|
-
<summary><strong>
|
|
192
|
+
<summary><strong>Is this an attack tool? Will my repo get taken down?</strong></summary>
|
|
209
193
|
|
|
210
|
-
|
|
211
|
-
|
|
194
|
+
No. It's defensive and authorized-targets-only; every PoC runs against your own target and it
|
|
195
|
+
ships no weaponized exploits. See [DISCLAIMER.md](DISCLAIMER.md). GitHub policy explicitly supports
|
|
196
|
+
dual-use security research.
|
|
212
197
|
|
|
213
198
|
</details>
|
|
214
199
|
|
|
215
200
|
<details>
|
|
216
201
|
<summary><strong>Does it upload my code?</strong></summary>
|
|
217
202
|
|
|
218
|
-
Analysis runs locally. Your agent receives the
|
|
219
|
-
|
|
203
|
+
Analysis runs locally. Your agent receives the results; its model provider has its own data
|
|
204
|
+
policy — review that separately.
|
|
220
205
|
|
|
221
206
|
</details>
|
|
222
207
|
|
|
223
208
|
<details>
|
|
224
|
-
<summary><strong>
|
|
209
|
+
<summary><strong>Which agents can use it?</strong></summary>
|
|
225
210
|
|
|
226
|
-
|
|
227
|
-
contractually authorized targets. Testing systems without authorization is illegal and
|
|
228
|
-
unsupported.
|
|
211
|
+
Any agent that supports local MCP servers. Setup configures the common ones automatically.
|
|
229
212
|
|
|
230
213
|
</details>
|
|
231
214
|
|
|
232
215
|
## Documentation
|
|
233
216
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
- [Security model](SECURITY.md)
|
|
237
|
-
- [Responsible use](DISCLAIMER.md)
|
|
238
|
-
|
|
239
|
-
## Disclaimer
|
|
240
|
-
|
|
241
|
-
Break Anything is for lawful security research, education, and testing of software you own or are
|
|
242
|
-
authorized to examine. See [DISCLAIMER.md](DISCLAIMER.md) for responsible-use guidance. You are
|
|
243
|
-
responsible for using this software in compliance with all applicable laws and the terms of any
|
|
244
|
-
third-party tool it orchestrates.
|
|
217
|
+
[Installation](docs/installation.md) · [Tool catalog & MCP contracts](docs/mcp-tools.md) ·
|
|
218
|
+
[Roadmap](docs/roadmap.md) · [Security model](SECURITY.md) · [Responsible use](DISCLAIMER.md)
|
|
245
219
|
|
|
246
220
|
## License
|
|
247
221
|
|
|
248
|
-
[MIT](LICENSE)
|
|
249
|
-
|
|
250
|
-
Break-authored code is licensed under MIT. Third-party tools it orchestrates (Semgrep, CodeQL,
|
|
251
|
-
Trivy, Grype, Nuclei, ZAP, and others) retain their own licenses; you must obtain and use them
|
|
252
|
-
under their applicable terms.
|
|
222
|
+
[MIT](LICENSE). Break-authored code is MIT; the engines it orchestrates keep their own licenses —
|
|
223
|
+
see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
package/bin/brk.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { scanDependencies } from "../src/scan.js";
|
|
3
3
|
import { renderHuman } from "../src/report.js";
|
|
4
4
|
|
|
5
|
-
const VERSION = "0.
|
|
5
|
+
const VERSION = "0.2.0";
|
|
6
6
|
|
|
7
7
|
const HELP = `Break Anything (brk) v${VERSION}
|
|
8
8
|
点你的 Agent 指向你拥有或已授权的软件,找到漏洞、证明它、修好它。
|
|
@@ -11,6 +11,7 @@ const HELP = `Break Anything (brk) v${VERSION}
|
|
|
11
11
|
brk deps [path] 扫描依赖 lockfile 的已知漏洞(默认当前目录)
|
|
12
12
|
brk secrets [path] 扫描泄露的密钥(工作区,--history 加扫 git 历史)
|
|
13
13
|
brk image <ref> 扫描容器镜像的已知漏洞(需 trivy)
|
|
14
|
+
brk sast [path] 静态代码分析找漏洞(需 semgrep)
|
|
14
15
|
brk mcp 以 MCP server 模式启动(供 Agent 调用)
|
|
15
16
|
brk doctor 检查运行环境与网络连通性
|
|
16
17
|
brk setup 打印把 Break Anything 接入 Agent 的 MCP 配置
|
|
@@ -35,6 +36,7 @@ function parseFlags(argv) {
|
|
|
35
36
|
if (a === "--json") flags.json = true;
|
|
36
37
|
else if (a === "--no-reachability") flags.reachability = false;
|
|
37
38
|
else if (a === "--no-color") flags.color = false;
|
|
39
|
+
else if (a.startsWith("--") && a.includes("=")) { const [k, v] = a.slice(2).split("="); flags[k] = v; }
|
|
38
40
|
else if (a.startsWith("--")) flags[a.slice(2)] = true;
|
|
39
41
|
else positional.push(a);
|
|
40
42
|
}
|
|
@@ -69,7 +71,7 @@ async function main() {
|
|
|
69
71
|
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
70
72
|
} else {
|
|
71
73
|
const color = flags.color !== false && process.stdout.isTTY;
|
|
72
|
-
process.stdout.write(renderHuman(result, { color }) + "\n");
|
|
74
|
+
process.stdout.write(renderHuman(result, { color, top: flags.top ? Number(flags.top) : undefined }) + "\n");
|
|
73
75
|
}
|
|
74
76
|
// 有高危且可达的发现时用非零退出码,方便接 CI
|
|
75
77
|
const hasReachableHigh = result.findings?.some(
|
|
@@ -117,6 +119,23 @@ async function main() {
|
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
119
121
|
|
|
122
|
+
if (cmd === "sast") {
|
|
123
|
+
const { flags, positional } = parseFlags(rest);
|
|
124
|
+
const target = positional[0] || process.cwd();
|
|
125
|
+
const { scanSast } = await import("../src/sast.js");
|
|
126
|
+
const { renderSast } = await import("../src/report.js");
|
|
127
|
+
const result = await scanSast(target, flags.config ? { config: flags.config } : {});
|
|
128
|
+
if (flags.json) {
|
|
129
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
130
|
+
} else {
|
|
131
|
+
const color = flags.color !== false && process.stdout.isTTY;
|
|
132
|
+
process.stdout.write(renderSast(result, { color, top: flags.top ? Number(flags.top) : undefined }) + "\n");
|
|
133
|
+
}
|
|
134
|
+
const hasHigh = result.findings?.some((f) => f.severity === "CRITICAL" || f.severity === "HIGH");
|
|
135
|
+
process.exitCode = hasHigh ? 1 : 0;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
120
139
|
if (cmd === "doctor") {
|
|
121
140
|
await doctor();
|
|
122
141
|
return;
|
|
Binary file
|
package/docs/hero-gif.md
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
# Hero GIF —
|
|
1
|
+
# Hero GIF — how it's made
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The README's first image. Short (~12s), tight, cool, real tool output. Generated with
|
|
4
|
+
[VHS](https://github.com/charmbracelet/vhs) from a repeatable script.
|
|
4
5
|
|
|
5
6
|
## What it shows
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
targets you own:
|
|
8
|
+
Two beats:
|
|
9
9
|
|
|
10
|
-
1. **
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
1. **Dependencies** — `brk deps` plays a quick scanning animation, then snaps the real top
|
|
11
|
+
findings for an old `lodash`/`minimist`: two CRITICALs + a HIGH at 21.3% EPSS, each tagged
|
|
12
|
+
`reachable`, with fix versions, over a bold `12 findings · 10 reachable` summary.
|
|
13
|
+
2. **Secrets** — `brk secrets --history` finds an AWS key removed from the code but still in git
|
|
14
|
+
history, pinned to the commit, with the "rotate, don't just delete" warning.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Outro: `# find -> prove -> fix npx break-anything`.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Why the deps output is pre-captured
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The `deps` scan hits the OSV network, which adds several seconds of dead air to a recording. So
|
|
21
|
+
the real colored output is captured once, off-camera, and replayed instantly behind a scanning
|
|
22
|
+
animation — the data is genuine, the GIF stays tight.
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
brew install asciinema agg # macOS; agg turns the cast into a GIF
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Record and convert:
|
|
24
|
+
Re-capture it (real, colored, top 3) any time:
|
|
27
25
|
|
|
28
26
|
```bash
|
|
29
|
-
|
|
30
|
-
asciinema rec hero.cast -c "bash demos/hero-demo.sh"
|
|
31
|
-
agg --font-size 22 --theme monokai hero.cast docs/assets/hero.gif
|
|
27
|
+
script -q demos/.hero/deps.ansi node bin/brk.js deps demos/sample-npm --top=3
|
|
32
28
|
```
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
`demos/hero-brk.sh` is the tape's `brk` wrapper: it animates + replays that file for `deps`, and
|
|
31
|
+
runs the real CLI for everything else (`secrets` is local and instant, so it runs live).
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
## Re-render
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
brew install vhs # once
|
|
37
|
+
vhs demos/hero.tape # writes docs/assets/hero.gif
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Tuning
|
|
41
41
|
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
- Post the GIF in the README, the Show HN, and the X thread. Same asset everywhere.
|
|
42
|
+
- **Look:** `Set Theme / FontSize / Width / Height / WindowBar / MarginFill / BorderRadius` at the
|
|
43
|
+
top of [`demos/hero.tape`](../demos/hero.tape).
|
|
44
|
+
- **Findings shown:** `--top=N` in the capture command (and the real CLI).
|
|
45
|
+
- **Avoid `→` in `Type` lines** — VHS can drop the multibyte arrow; use `->`. Arrows inside the
|
|
46
|
+
captured `deps.ansi` render fine.
|
|
48
47
|
|
|
49
|
-
##
|
|
48
|
+
## Guardrails
|
|
50
49
|
|
|
51
|
-
- Every target
|
|
52
|
-
- The CVEs and EPSS numbers are real (live OSV / FIRST.org
|
|
53
|
-
someone reruns it. Do not fake the output.
|
|
50
|
+
- Every target is a sample project or a throwaway repo you own — never a third party.
|
|
51
|
+
- The CVEs and EPSS numbers are real (captured from a live OSV / FIRST.org scan). Don't fake them.
|