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/docs/readme/README_zh.md
CHANGED
|
@@ -4,206 +4,169 @@
|
|
|
4
4
|
|
|
5
5
|
# Break Anything · 攻破一切
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### 你以为你的服务很安全。你从没站在攻击者的角度看过它。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Break Anything 把你的编码 Agent 指向你自己的代码、应用和基础设施,**像攻击者一样**审视它们——挖出真正可被利用的那些、在你自己构建上证明给你看、再修掉。赶在别人先找到之前。
|
|
10
|
+
|
|
11
|
+
*用攻击者的眼睛,看你自己的服务。*
|
|
10
12
|
|
|
11
13
|
[](https://www.npmjs.com/package/break-anything)
|
|
12
14
|
[](../mcp-tools.md)
|
|
13
15
|
[](../../DISCLAIMER.md)
|
|
14
16
|
[](../../LICENSE)
|
|
15
17
|
|
|
16
|
-
**[快速开始](#快速开始) · [
|
|
18
|
+
**[快速开始](#快速开始) · [凭什么不一样](#凭什么不一样) · [30 秒看懂](#30-秒看懂) · [军火库](#军火库) · [FAQ](#faq)**
|
|
17
19
|
|
|
18
20
|
<code>npx break-anything setup</code>
|
|
19
21
|
|
|
20
22
|
</div>
|
|
21
23
|
|
|
22
24
|
> [!IMPORTANT]
|
|
23
|
-
> Break Anything
|
|
24
|
-
>
|
|
25
|
-
|
|
25
|
+
> Break Anything 只检测**你拥有、或已获得明确授权**的软件。每个 PoC 都只打你自己的靶子。
|
|
26
|
+
> 它是防御工具,不是攻击框架,严禁指向任何第三方系统。
|
|
27
|
+
|
|
28
|
+
<div align="center">
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
> 只从本 README 和 `break-anything` npm 包中列出的官方来源获取 Break Anything。
|
|
29
|
-
> 相似的仓库名或抄来的 README 不代表那是官方版本。
|
|
30
|
+
<img src="../assets/hero.gif" alt="Break Anything" width="900" />
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
</div>
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
它会检查你的代码、依赖、运行中的应用和基础设施,你不用去学十个扫描器;它告诉你**哪里**有漏洞、
|
|
35
|
-
用一条可复现的发现**证明**给你看,再把修复方案交给你的 Agent,或交给
|
|
36
|
-
[Patch Anything](#配套patch-anything)。
|
|
34
|
+
---
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
OSV、Trivy、Grype、Nuclei、ZAP、gitleaks 等等)。同样的能力也能在终端里直接用。分析全程本地运行,
|
|
40
|
-
每条结果都带着证据、可利用性信号,以及它自身的局限。
|
|
36
|
+
"应该没事吧。" 上线了、能跑、没人投诉,于是你默认它是安全的。但"还没出事"从来不是一次安全检测。唯一诚实的检测,是像攻击者那样审视你自己的服务:哪个依赖是一扇敞开的门、哪把 key 还躺在 git 历史里、哪个接口在把别人的数据交出去。
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
**在你的实际调用路径里到底能不能打通**,对**你自己的**靶子生成 PoC,并且——**当上游根本没有修复版本时**
|
|
44
|
-
——给出一个补丁、一层兼容 shim 或一个缓解方案,不让一个被遗弃的依赖变成你的事故。
|
|
38
|
+
而且,安全没有终点。2026 年 10 月,一个未授权的高危 RCE 在 PHP 自己身上被挖了出来、藏了好几年(php2shell)——连撑起大半个互联网的语言都还在冒高危洞,你的应用凭什么没有。你每加一个依赖,攻击面就更大一圈,而且你补不完所有洞。所以只补攻击者*今天*真能够到的那几条。
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
而且游戏规则刚变了:同样会写代码的 AI Agent,如今正被用来大规模地挖漏洞——攻击者手里也有。抢在他们前面,用同样的杠杆先找到你自己的洞。
|
|
47
41
|
|
|
48
|
-
|
|
42
|
+
**Break Anything 把这双"攻击者的眼睛"交给你的编码 Agent**——一句话,只针对你拥有的软件:挖出真正可被利用的、在*你自己*构建上证明、连修复一起给你。全程本地,绝不指向任何你不拥有的东西。
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
## 快速开始
|
|
51
45
|
|
|
52
46
|
```bash
|
|
53
47
|
npx break-anything setup
|
|
54
48
|
```
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
工作流指令,并对现有配置做备份。完成后重启 Agent。
|
|
50
|
+
选 Agent、确认改动、重启。支持 Claude Code、Codex、Cursor、Gemini CLI、Windsurf,以及任何能跑本地 MCP 的客户端。然后直接说:
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
```text
|
|
53
|
+
用 Break Anything 扫这个项目。只给我代码里真正可达的漏洞,证明最严重的那条,给我修复方案。
|
|
54
|
+
```
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
想用终端?一行命令,今天就能跑:
|
|
62
57
|
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
```bash
|
|
59
|
+
npx -y break-anything deps ./ # 依赖 CVE,按可达性 + EPSS 排序
|
|
60
|
+
npx -y break-anything secrets ./ --history # 工作区 + 完整 git 历史里的泄露密钥
|
|
61
|
+
npx -y break-anything image my-svc:latest # 容器镜像的 OS + 应用层 CVE
|
|
62
|
+
npx -y break-anything sast ./src # 静态代码分析(注入、越权、SSRF…)
|
|
66
63
|
```
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
## 凭什么不一样
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
扫描器都能甩你一张清单。清单本身就是问题。Break Anything 做的是清单做不到的三件事:
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
- **看可达性——它像攻击者一样思考。** 攻击者不会挨个去看你那 400 条理论 CVE,他们只冲那几条真能够到的。Break Anything 也一样:把 `confirmed`(已确认)→ `reachable`(可达)→ `present`(存在)→ `not-reachable`(不可达)分开。你从不调用的那个脆弱 `lodash` 是噪音;活代码路径上的那个才是发现。你分诊 3 条,不是 400 条。
|
|
70
|
+
- **给证据,不给空话。** 不是甩一段 CVSS 描述,而是在*你自己*构建上跑出一个 PoC——那条能打穿它的具体输入或请求——把"理论上有洞"变成"这就是复现"。
|
|
71
|
+
- **上游没了也给你修。** 维护者消失、没有修复版本?它给你一个补丁、一个锁版本、一层兼容 shim,或一个维护中的 fork,不让一个被遗弃的依赖变成你的事故。交给 [Patch Anything](#配套patch-anything) 还能直接出可合并的 PR。
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
npx -y break-anything sast ./src
|
|
73
|
+
它不取代 OSV、Trivy、Semgrep、ZAP——而是把它们**编排**在一个 Agent 接口下,再做它们做不了的推理。
|
|
78
74
|
|
|
79
|
-
|
|
80
|
-
npx -y break-anything image my-service:latest
|
|
81
|
-
```
|
|
75
|
+
## 30 秒看懂
|
|
82
76
|
|
|
83
|
-
|
|
77
|
+
三个你会用到它的时刻,每个都是一句话丢给 Agent:
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
| 这一刻 | 你问 | 它给你 |
|
|
80
|
+
| --- | --- | --- |
|
|
81
|
+
| **"某 CVE 在刷屏——我们中招没?"** | *"扫我依赖,只标可达的。"* | 3 条可达 CVE + 修复版本,而不是 400 行的墙 |
|
|
82
|
+
| **"有人提交密钥了吗?"** | *"扫仓库和 git 历史里的密钥。"* | 泄露的 key、引入它的 commit、"去轮换别只删" |
|
|
83
|
+
| **"用户 A 能读到用户 B 的数据吗?"** | *"查 /orders/:id 的越权。"* | 那个 IDOR,用两个账号在 localhost 上证明给你看 |
|
|
89
84
|
|
|
90
|
-
|
|
85
|
+
## 你可以指给它什么
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
你不用自己选模式。把手头的东西丢给它,它自动识别形态、路由到对应引擎。
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
| 你给它 | 形态 | 对应类别 |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| 一个仓库 / 源码目录 | 源码 / 技术栈 | 依赖、代码、密钥 |
|
|
92
|
+
| 一个 lockfile(`package-lock.json`、`composer.lock`、`go.mod`…) | 依赖清单 | 依赖 |
|
|
93
|
+
| 一个容器镜像 | 构建产物 | 容器 |
|
|
94
|
+
| 一个 APK / IPA 或编译二进制 | 构建产物 | 移动、模糊测试 |
|
|
95
|
+
| 一份 Terraform / Kubernetes / Dockerfile | 配置 | 基础设施配置 |
|
|
96
|
+
| 一个运行中的网址或 API(你自己的) | 活体系统 | 运行应用、API |
|
|
97
|
+
| 云账号凭据(你自己的) | 活体账号 | 云配置 |
|
|
98
|
+
| git 历史 | 仓库元数据 | 密钥 |
|
|
97
99
|
|
|
98
|
-
##
|
|
100
|
+
## 军火库
|
|
99
101
|
|
|
100
|
-
|
|
101
|
-
可利用性信号和建议的修复方式一起返回。Agent 据此排优先级、复现、修复。CLI 命令走同一套工作流。
|
|
102
|
+
按**扫描类别**组织(安全团队的通用语言),每类都编排真实流水线里在跑的工具。✅ 0.1.0 已发 · 🧭 路线图。
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
### ✅ 今日已发
|
|
104
105
|
|
|
105
|
-
|
|
106
|
+
- **依赖(SCA)** — 整棵依赖树的已知 CVE,按可达性 + EPSS 排序,带修复版本。引擎:[OSV](https://osv.dev)、[Trivy](https://github.com/aquasecurity/trivy)、[Grype](https://github.com/anchore/grype)、pip-audit、govulncheck、composer audit。覆盖 npm/PyPI/Composer/Go/Maven/Cargo/RubyGems/NuGet。
|
|
107
|
+
- **密钥(Secrets)** — 工作区 + 完整 git 历史里的泄露 key/令牌/私钥,脱敏。引擎:[Gitleaks](https://github.com/gitleaks/gitleaks)、[TruffleHog](https://github.com/trufflesecurity/trufflehog)。
|
|
108
|
+
- **容器镜像** — OS + 应用层 CVE、Dockerfile 坏味道、层里的密钥。引擎:[Trivy](https://github.com/aquasecurity/trivy)、[Grype](https://github.com/anchore/grype)、[Hadolint](https://github.com/hadolint/hadolint)。
|
|
109
|
+
- **静态代码(SAST)** — 注入、越权、不安全反序列化、SSRF、硬编码密钥——每条带文件/行号、CWE/OWASP 标签和命中代码片段。引擎:[Semgrep](https://semgrep.dev)。
|
|
106
110
|
|
|
107
|
-
|
|
108
|
-
| --- | --- |
|
|
109
|
-
| **Find 找** | 在依赖、源码、运行中的应用、基础设施里枚举弱点。 |
|
|
110
|
-
| **Prove 证** | 确认这个发现在你的用法里真的可达,并对*你的*靶子生成 PoC。 |
|
|
111
|
-
| **Fix 修** | 产出补丁、锁版本、shim 或缓解方案——自己修,或交给 Patch Anything。 |
|
|
111
|
+
### 🧭 路线图
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
- **更多 SAST 引擎** — [CodeQL](https://codeql.github.com)、SonarQube CE、Bandit(Py)、gosec(Go)、Brakeman(Rails)、Find-Sec-Bugs(Java)、security-code-scan(.NET)、retire.js(前端 JS)。
|
|
114
|
+
- **基础设施与 Kubernetes(IaC)** — `apply` 前揪出公开桶、开放端口、过宽 IAM、集群配置错误。[Checkov](https://www.checkov.io)、tfsec、Terrascan、[KICS](https://kics.io)、[Kubescape](https://github.com/kubescape/kubescape)、kube-bench、[Falco](https://falco.org)(运行时)。
|
|
115
|
+
- **运行应用与攻击面(DAST)** — OWASP Top 10、目录/参数发现、XSS、注入,打你授权的应用。[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);攻击面测绘用 [Nmap](https://nmap.org) + [Amass](https://github.com/owasp-amass/amass) + ProjectDiscovery。
|
|
116
|
+
- **API** — 越权(IDOR/BOLA)、认证绕过、批量赋值(OWASP API Top 10)。[Schemathesis](https://github.com/schemathesis/schemathesis)、ZAP。
|
|
117
|
+
- **进攻 / 漏洞利用** — *仅限授权渗透;默认关闭、需显式开启、须书面授权。* 在你拥有的目标上证明可利用性。[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(域渗透)、[OpenVAS](https://www.openvas.org)。
|
|
118
|
+
- **AI / 大模型安全** — 对你自己的模型和 Agent 做提示注入、越狱、数据泄露检测。[Garak](https://github.com/NVIDIA/garak)。
|
|
119
|
+
- **二进制与产物分析** — 编译二进制里的已知脆弱依赖和不安全模式。[Ghidra](https://ghidra-sre.org)、[radare2](https://github.com/radareorg/radare2)、[angr](https://github.com/angr/angr)(与 REA 互补)。
|
|
120
|
+
- **云配置 · 智能合约 · 移动 · 模糊测试** — [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。
|
|
115
121
|
|
|
116
|
-
|
|
122
|
+
逐工具完整目录和 MCP 契约见 [docs/mcp-tools.md](../mcp-tools.md)。所有动态(发流量)类别**默认关闭**,拒绝任何不在白名单里的目标。
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
| --- | --- | --- |
|
|
120
|
-
| 依赖清单 | `package-lock`、`requirements.txt`、`go.mod`、`composer.lock`、`pom.xml`、`Cargo.toml` 里的已知 CVE;EPSS 利用概率;CISA KEV 状态;修复版本;调用路径可达性 | OSV / GHSA(内置);可达性用本地源码 |
|
|
121
|
-
| 源代码 | 注入、越权、不安全反序列化、路径穿越、SSRF、硬编码密钥——带数据流证据 | Semgrep / CodeQL 规则 |
|
|
122
|
-
| 仓库及 git 历史里的密钥 | 泄露的 API key、token、私钥,以及泄露的位置 | gitleaks / trufflehog 式扫描 |
|
|
123
|
-
| 运行中的 Web 应用(你的主机) | 对授权的 localhost 或预发目标做 OWASP Top 10 动态检测 | Chrome 系浏览器;OWASP ZAP |
|
|
124
|
-
| HTTP API(你的主机) | 越权、IDOR、认证绕过、批量赋值——带可复现请求 | 授权的 base URL + 凭据 |
|
|
125
|
-
| 容器镜像 | OS 层和应用层 CVE、配置错误、镜像层里的密钥 | Trivy / Grype |
|
|
126
|
-
| Dockerfile / IaC | Dockerfile、Terraform、Kubernetes、CloudFormation 里的配置错误 | Trivy / checkov 规则 |
|
|
127
|
-
| 前端打包产物 | 打进浏览器的脆弱 JS 库和密钥 | Node.js + npm |
|
|
128
|
-
| 编译产物 | 捆绑进去的已知脆弱依赖、内存安全隐患 | 静态检查 |
|
|
129
|
-
| 智能合约(可选) | Solidity 的重入、整数溢出、权限缺口 | Slither |
|
|
130
|
-
|
|
131
|
-
所有动态能力**默认关闭**,需要同时满足操作者策略和单次运行的显式授权标志。静态检查只读文件、不运行它们。
|
|
132
|
-
|
|
133
|
-
## 演示
|
|
134
|
-
|
|
135
|
-
十个完整 demo——**全部打在你自己拥有的、开源的、或故意做成脆弱的靶场上**。完整脚本见 [`demos/`](../../demos/)。
|
|
136
|
-
|
|
137
|
-
1. **OWASP Juice Shop** — 指向授权靶场,找到一个 IDOR,用一条请求证明,讲清怎么修。
|
|
138
|
-
2. **你忘了的那个依赖** — lockfile 里一个老 `lodash`/`minimist`:找到它,确认脆弱函数真的被调用,给出修复版本。
|
|
139
|
-
3. **php2shell 之后的 PHP 供应链** — 一个 PHP 项目锁了脆弱的 `composer` 依赖:Break Anything 把你整条依赖链画出来,让下一个 php2shell 不会打你个措手不及。
|
|
140
|
-
4. **Log4Shell 靶场** — 一个带脆弱 `log4j` 的 Java 服务:确认它从你的日志路径真的可达,而不只是"存在"。
|
|
141
|
-
5. **泄露的密钥** — 一个三个月前把 AWS key 提交进去的测试仓库:在历史里找到它,算出影响面。
|
|
142
|
-
6. **脆弱基础镜像** — 一个基于过期基础镜像的 `Dockerfile`:列出 OS + 应用 CVE 和最小升级方案。
|
|
143
|
-
7. **公开的桶** — 一个把 S3 桶设成全网可读的 Terraform 文件:在 `apply` 之前拦住。
|
|
144
|
-
8. **你自己的 Express API** — `/orders/:id` 上的一个 IDOR:用两个账号在 localhost 上证明。
|
|
145
|
-
9. **重入** — 靶场里的一个 Solidity 合约:追出状态更新之前的那个外部调用。
|
|
146
|
-
10. **Find → Fix 交接** — 把上面任意一条发现交给 [Patch Anything](#配套patch-anything),看它起草修复 PR。
|
|
147
|
-
|
|
148
|
-
如果你攻破了什么有意思的东西(而且你有权攻破它),开个 issue 或 PR,附上目标、你的问题和你的发现。
|
|
124
|
+
## 工作原理
|
|
149
125
|
|
|
150
|
-
|
|
126
|
+
Agent 通过 MCP 调用 Break Anything 检查一个你掌控的目标;它路由到对应引擎、确认可达性,每条结果带证据和修复返回。CLI 走同一套工作流。
|
|
151
127
|
|
|
152
|
-
|
|
128
|
+

|
|
153
129
|
|
|
154
|
-
|
|
130
|
+
**Find 找**(依赖/代码/密钥/镜像/IaC/运行应用里的弱点)→ **Prove 证**(对你的靶子生成 PoC 证明可达)→ **Fix 修**(直接修,或交给 Patch Anything)。"未发现"绝不等于"安全"。
|
|
131
|
+
|
|
132
|
+
## 配套:Patch Anything
|
|
155
133
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
134
|
+
> **Break Anything** 找出来、证明它 → **[Patch Anything](https://github.com/EnkiHQ/patch-anything)** 修掉它。
|
|
135
|
+
|
|
136
|
+
把任意发现交给它,起草补丁、升级、shim 或 fork。发现与修复,一个闭环。
|
|
159
137
|
|
|
160
138
|
## FAQ
|
|
161
139
|
|
|
162
|
-
<details>
|
|
163
|
-
<summary><strong>这是攻击工具吗?会被下架吗?</strong></summary>
|
|
140
|
+
<details><summary><strong>和 npm audit / Trivy / Snyk 有什么不同?</strong></summary>
|
|
164
141
|
|
|
165
|
-
|
|
166
|
-
它不附带任何针对第三方系统的武器化 exploit。见 [DISCLAIMER.md](../../DISCLAIMER.md)。
|
|
167
|
-
GitHub 政策明确支持双用途安全研究。
|
|
142
|
+
它们报"存在"——依赖树里任何地方存在的每个漏洞。Break Anything 多了**可达性**(是否真被调用)、**证明**(对你自己构建的 PoC)、以及上游无修复时的**自救修复**,还把依赖/代码/密钥/镜像/IaC/运行时统一到一个 Agent 接口下。
|
|
168
143
|
|
|
169
144
|
</details>
|
|
170
145
|
|
|
171
|
-
<details>
|
|
172
|
-
<summary><strong>和 npm audit / Trivy / Snyk 有什么不同?</strong></summary>
|
|
146
|
+
<details><summary><strong>它取代这些工具吗?</strong></summary>
|
|
173
147
|
|
|
174
|
-
|
|
175
|
-
(对你自己构建的 PoC),以及上游无修复时的**自救修复**。它还把依赖、源码、运行时、基础设施的发现
|
|
176
|
-
统一到一个 Agent 接口下。
|
|
148
|
+
不,它编排它们。Break Anything 是大脑和接口,OSV/Trivy/Semgrep/ZAP 是引擎。你拿到它们的深度,又不用逐个去学。
|
|
177
149
|
|
|
178
150
|
</details>
|
|
179
151
|
|
|
180
|
-
<details>
|
|
181
|
-
<summary><strong>哪些 Agent 能用?</strong></summary>
|
|
152
|
+
<details><summary><strong>这是攻击工具吗?会被下架吗?</strong></summary>
|
|
182
153
|
|
|
183
|
-
|
|
154
|
+
不是。防御性、仅授权目标;每个 PoC 都打你自己的靶子,不含武器化 exploit。见 [DISCLAIMER.md](../../DISCLAIMER.md)。GitHub 政策明确支持双用途安全研究。
|
|
184
155
|
|
|
185
156
|
</details>
|
|
186
157
|
|
|
187
|
-
<details>
|
|
188
|
-
<summary><strong>会上传我的代码吗?</strong></summary>
|
|
158
|
+
<details><summary><strong>会上传我的代码吗?</strong></summary>
|
|
189
159
|
|
|
190
|
-
|
|
160
|
+
分析在本地。Agent 收到结果,其模型提供商有自己的数据政策,单独确认。
|
|
191
161
|
|
|
192
162
|
</details>
|
|
193
163
|
|
|
194
|
-
<details>
|
|
195
|
-
<summary><strong>能测一个我不拥有的网站吗?</strong></summary>
|
|
164
|
+
<details><summary><strong>哪些 Agent 能用?</strong></summary>
|
|
196
165
|
|
|
197
|
-
|
|
166
|
+
任何支持本地 MCP server 的 Agent。Setup 自动配置常见的那几个。
|
|
198
167
|
|
|
199
168
|
</details>
|
|
200
169
|
|
|
201
|
-
## 免责声明
|
|
202
|
-
|
|
203
|
-
Break Anything 用于合法的安全研究、教育,以及对你拥有或已授权软件的检测。责任使用指引见
|
|
204
|
-
[DISCLAIMER.md](../../DISCLAIMER.md)。你有责任在遵守所有适用法律、以及它所编排的任何第三方工具条款的
|
|
205
|
-
前提下使用本软件。
|
|
206
|
-
|
|
207
170
|
## 许可
|
|
208
171
|
|
|
209
|
-
[MIT](../../LICENSE)
|
|
172
|
+
[MIT](../../LICENSE)。Break 自身代码为 MIT;编排的引擎各自保留其许可证,见 [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md)。
|
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
Break Anything is growing from a dependency scanner into one agent-facing interface for finding,
|
|
4
|
+
proving, and fixing weaknesses across the whole surface of a project you own. Roadmap items
|
|
5
|
+
describe direction, not shipped support. A new scanner joins the public workflow only once it
|
|
6
|
+
produces the same finding envelope (severity, evidence, exploitability, remediation, limitations)
|
|
7
|
+
as the shipped scanners.
|
|
8
|
+
|
|
9
|
+
## Shipped (0.2.0)
|
|
10
|
+
|
|
11
|
+
- **Supply chain / dependencies (SCA)** — npm, Composer (PHP), pip; OSV lookup, import-based
|
|
12
|
+
reachability heuristic, EPSS, fix versions.
|
|
13
|
+
- **Secrets** — working tree + git history, redacted output.
|
|
14
|
+
- **Container images** — via Trivy.
|
|
15
|
+
- **Static code (SAST)** — via Semgrep: injection, broken access control, deserialization, SSRF,
|
|
16
|
+
with CWE/OWASP tags and the offending snippet.
|
|
17
|
+
- **MCP tools** — `deps_scan`, `secrets_scan`, `image_scan`, `sast_scan`.
|
|
18
|
+
|
|
19
|
+
## Next
|
|
20
|
+
|
|
21
|
+
- **More SAST engines** — CodeQL, Bandit (Python), gosec (Go), Brakeman (Rails), Find-Sec-Bugs
|
|
22
|
+
(Java), security-code-scan (.NET), retire.js (frontend) — broaden language/stack coverage.
|
|
23
|
+
- **Exploitability engine** — upgrade reachability from "is it imported" to "is the vulnerable
|
|
24
|
+
symbol on a real call path", and rank with EPSS + CISA KEV.
|
|
25
|
+
- **IaC** — Checkov / tfsec / Terrascan / KICS over Terraform, CloudFormation, Kubernetes/Helm,
|
|
26
|
+
Dockerfile.
|
|
27
|
+
- **DAST (authorized)** — OWASP ZAP + Nuclei + Nikto against your own running app.
|
|
28
|
+
|
|
29
|
+
## Later
|
|
30
|
+
|
|
31
|
+
- **API security** — Schemathesis (OpenAPI fuzzing) + auth-matrix prober for BOLA/IDOR, broken
|
|
32
|
+
auth, mass assignment (OWASP API Top 10).
|
|
33
|
+
- **Cloud posture (CSPM)** — Prowler / ScoutSuite against your own AWS/GCP/Azure accounts.
|
|
34
|
+
- **Attack surface & recon** — Nmap + Amass + ProjectDiscovery (ffuf/Katana/Dalfox) over your own domains and hosts.
|
|
35
|
+
- **Offensive / exploitation (authorized pentest)** — Metasploit, Hydra, Hashcat, BloodHound + Impacket, OpenVAS. Gated, off by default, written-permission-only; turns a "reachable" finding into a proven one.
|
|
36
|
+
- **AI / LLM security** — Garak-backed prompt-injection, jailbreak, and data-leakage probes for your own models and agents.
|
|
37
|
+
- **Binary & artifact analysis** — Ghidra / radare2 / angr for compiled binaries and firmware (pairs with REA).
|
|
38
|
+
- **Smart contracts** — Slither / Mythril / Echidna for Solidity.
|
|
39
|
+
- **Mobile** — MobSF for APK/IPA.
|
|
40
|
+
- **Fuzzing** — AFL++ / libFuzzer / Jazzer / Atheris with minimized reproducers.
|
|
41
|
+
- **Self-remediation** — when upstream has no fix: generate a patch, pin, compatibility shim, or
|
|
42
|
+
point to a maintained fork. Deep handoff to [Patch Anything](https://github.com/EnkiHQ/patch-anything).
|
|
43
|
+
- **SBOM & evidence bundles** — generate/diff SBOMs (Syft) and portable, reproducible finding
|
|
44
|
+
records that survive across sessions and gate CI.
|
|
45
|
+
|
|
46
|
+
## Principles
|
|
47
|
+
|
|
48
|
+
- Defensive, authorized-targets-only. Dynamic capabilities stay off by default.
|
|
49
|
+
- Orchestrate trusted tools; don't reinvent scanners.
|
|
50
|
+
- Signal over noise: always separate "confirmed", "reachable", and "present".
|
|
51
|
+
- Honesty: absence of a finding is never reported as proof of safety.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "break-anything",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "One CLI and MCP server for coding agents to find vulnerabilities across code, dependencies, apps, and infrastructure — on targets you own or are authorized to test.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"reachability",
|
|
16
16
|
"appsec"
|
|
17
17
|
],
|
|
18
|
-
"homepage": "https://github.com/
|
|
18
|
+
"homepage": "https://github.com/EnkiHQ/break-anything#readme",
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/
|
|
20
|
+
"url": "https://github.com/EnkiHQ/break-anything/issues"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/
|
|
24
|
+
"url": "git+https://github.com/EnkiHQ/break-anything.git"
|
|
25
25
|
},
|
|
26
|
-
"author": "
|
|
26
|
+
"author": "EnkiHQ",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"bin": {
|
|
29
29
|
"brk": "bin/brk.js"
|
package/src/http.js
CHANGED
|
@@ -9,7 +9,7 @@ export async function fetchJson(url, { method = "GET", body, timeoutMs = 15000,
|
|
|
9
9
|
headers: {
|
|
10
10
|
"accept": "application/json",
|
|
11
11
|
...(body ? { "content-type": "application/json" } : {}),
|
|
12
|
-
"user-agent": "break-anything/0.1 (+https://github.com/
|
|
12
|
+
"user-agent": "break-anything/0.1 (+https://github.com/EnkiHQ/break-anything)",
|
|
13
13
|
...headers,
|
|
14
14
|
},
|
|
15
15
|
body: body ? JSON.stringify(body) : undefined,
|
package/src/mcp.js
CHANGED
|
@@ -4,6 +4,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprot
|
|
|
4
4
|
import { scanDependencies } from "./scan.js";
|
|
5
5
|
import { scanSecrets } from "./secrets.js";
|
|
6
6
|
import { scanImage } from "./image.js";
|
|
7
|
+
import { scanSast } from "./sast.js";
|
|
7
8
|
|
|
8
9
|
const TOOLS = [
|
|
9
10
|
{
|
|
@@ -58,11 +59,27 @@ const TOOLS = [
|
|
|
58
59
|
required: ["ref"],
|
|
59
60
|
},
|
|
60
61
|
},
|
|
62
|
+
{
|
|
63
|
+
name: "sast_scan",
|
|
64
|
+
description:
|
|
65
|
+
"Static application security testing (SAST) on a source tree using Semgrep. Finds injection, " +
|
|
66
|
+
"broken access control, insecure deserialization, SSRF, hardcoded secrets and more, each with " +
|
|
67
|
+
"file/line, CWE/OWASP tags, and the offending snippet. Requires Semgrep to be installed. " +
|
|
68
|
+
"Scan only code you own or are authorized to test.",
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
path: { type: "string", description: "Absolute path to the source tree to scan." },
|
|
73
|
+
config: { type: "string", description: "Semgrep ruleset (default p/security-audit)." },
|
|
74
|
+
},
|
|
75
|
+
required: ["path"],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
61
78
|
];
|
|
62
79
|
|
|
63
80
|
export async function startMcpServer() {
|
|
64
81
|
const server = new Server(
|
|
65
|
-
{ name: "break-anything", version: "0.
|
|
82
|
+
{ name: "break-anything", version: "0.2.0" },
|
|
66
83
|
{ capabilities: { tools: {} } },
|
|
67
84
|
);
|
|
68
85
|
|
|
@@ -81,6 +98,9 @@ export async function startMcpServer() {
|
|
|
81
98
|
} else if (name === "image_scan") {
|
|
82
99
|
if (!strArg(args.ref)) return bad("缺少必填参数 ref。");
|
|
83
100
|
result = await scanImage(args.ref);
|
|
101
|
+
} else if (name === "sast_scan") {
|
|
102
|
+
if (!strArg(args.path)) return bad("缺少必填参数 path。");
|
|
103
|
+
result = await scanSast(args.path, args.config ? { config: args.config } : {});
|
|
84
104
|
} else {
|
|
85
105
|
return bad(`Unknown tool: ${name}`);
|
|
86
106
|
}
|