bugx-cli 0.1.5 → 0.1.6
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 +89 -210
- package/core/README.md +1 -1
- package/core/agent/agent_targets.py +5 -1
- package/core/agent/agent_workspace.py +10 -2
- package/core/autonomous_cve/run_fault_matrix.py +692 -0
- package/core/autonomous_cve/run_oss_cve_exploit_verify.py +608 -0
- package/core/autonomous_cve/run_six_worker_penetration.py +382 -0
- package/core/autonomous_cve/verifier.py +5 -7
- package/core/bugx.md +1 -1
- package/core/bugx_paths.py +2 -2
- package/core/bundled_docs/OVERVIEW.md +69 -236
- package/core/bundled_docs/README.md +2 -2
- package/core/bundled_docs/README_EN.md +67 -211
- package/core/bundled_docs/ai/01_AI_REFERENCE.md +3 -3
- package/core/bundled_docs/ai/02_AI_USAGE.md +1 -1
- package/core/bundled_docs/ai/03_AI_COMMANDS.md +1 -1
- package/core/bundled_docs/hosts/bugx_SKILL.md +2 -2
- package/core/bundled_docs/hosts/platform_bugx_SKILL.md +2 -2
- package/core/bundled_docs/manifest.json +10 -10
- package/core/bundled_docs/reference/04_REPOSITORY_TOPOLOGY.md +1 -1
- package/core/cloud_sync/flywheel_client.py +89 -0
- package/core/contracts/README.md +1 -1
- package/core/contracts/bugx-runtime-contract.md +1 -1
- package/core/contracts/bugx-worker.md +1 -1
- package/core/coverage/coverage_gate.py +12 -2
- package/core/coverage/coverage_manifest.py +1 -1
- package/core/coverage/coverage_validate.py +5 -3
- package/core/engine-integrity.json +104 -92
- package/core/host_runtime/adapters.py +45 -6
- package/core/host_runtime/autonomous_runner.py +3 -2
- package/core/host_runtime/host_registry.py +6 -1
- package/core/hosts/__init__.py +1 -0
- package/core/hosts/agnescode.py +1 -1
- package/core/hosts/base.py +1 -0
- package/core/hosts/claude.py +6 -0
- package/core/hosts/cline.py +6 -0
- package/core/hosts/codex.py +10 -1
- package/core/hosts/kimi.py +6 -4
- package/core/hosts/opencode.py +1 -1
- package/core/hosts/zcode.py +6 -0
- package/core/infra/README.md +1 -1
- package/core/infra/build_info.py +2 -2
- package/core/launch_phases/README.md +2 -2
- package/core/launch_phases/startup_gates.py +10 -1
- package/core/launch_phases/startup_version_gate.py +2 -2
- package/core/ledger/README.md +1 -1
- package/core/locales/en-US.json +2 -0
- package/core/locales/zh-CN.json +2 -0
- package/core/mcp_handlers/supervisor_handlers.py +33 -1
- package/core/mcp_handlers/telemetry_handlers.py +32 -0
- package/core/mcp_handlers/tool_table.py +34 -0
- package/core/metadata.txt +1 -1
- package/core/planning/README.md +1 -1
- package/core/retrieval/README.md +1 -1
- package/core/retrieval/symbol_index.py +2 -1
- package/core/retrieval/universal_code_matcher.py +1 -0
- package/core/runtime/README.md +1 -1
- package/core/runtime/mining_quality_framework.py +2 -1
- package/core/runtime/scenario_eval.py +5 -2
- package/core/supervisor/README.md +1 -1
- package/core/supervisor/worker_execution.py +5 -0
- package/docs/07_distribution/01_README_NPM.md +89 -210
- package/ecosystem/integrations/dsh/mcp/package.json +2 -2
- package/ecosystem/integrations/dsh/ui/package.json +1 -1
- package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +1 -1
- package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
- package/ecosystem/integrations/qoder/connector-meta.json +1 -1
- package/ecosystem/integrations/workbuddy/connector-meta.json +1 -1
- package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +1 -1
- package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +2 -2
- package/interfaces/cli/bugx_cli/__init__.py +1 -1
- package/interfaces/cli/bugx_cli/commands/agent.py +18 -0
- package/interfaces/cli/bugx_cli/commands/audit.py +3 -5
- package/interfaces/cli/bugx_cli/commands/doctor.py +1 -1
- package/interfaces/cli/bugx_cli/commands/plugin.py +20 -0
- package/interfaces/cli/bugx_cli/commands/plugin_claude.py +2 -2
- package/interfaces/cli/bugx_cli/host_adapters.py +161 -1
- package/interfaces/cli/bugx_cli/hosts/registry.py +32 -0
- package/interfaces/cli/bugx_cli/infra/engine_installer.py +4 -4
- package/interfaces/cli/bugx_cli/infra/host_sync.py +1 -1
- package/package.json +1 -1
- package/scripts/sync-version.mjs +1 -1
- package/skills/platform/bugx/SKILL.md +2 -2
|
@@ -141,7 +141,7 @@ def _run(argv: list[str], *, cwd: Path, timeout: float = 120.0,
|
|
|
141
141
|
# L3 等场景验证当前 checkout;不让已安装的旧引擎成为量具。
|
|
142
142
|
merged["BUGX_DEV_MODE"] = "1"
|
|
143
143
|
# 源码树里的版本声明是构建模板;开发态启动门禁需要同一解析值。
|
|
144
|
-
merged["BUGX_VERSION"] = os.environ.get("BUGX_VERSION", "0.1.
|
|
144
|
+
merged["BUGX_VERSION"] = os.environ.get("BUGX_VERSION", "0.1.6")
|
|
145
145
|
merged["HOME"] = str(_sandbox_home())
|
|
146
146
|
try:
|
|
147
147
|
proc = subprocess.run(
|
|
@@ -576,8 +576,11 @@ def run_l6_fault_matrix(root: Path, work: Path) -> LevelResult:
|
|
|
576
576
|
sandbox = Path(tempfile.mkdtemp(prefix="bugx-l6-"))
|
|
577
577
|
receipt = sandbox / "fault-matrix-receipt.json"
|
|
578
578
|
try:
|
|
579
|
+
fault_script = Path(__file__).resolve().parent.parent / "autonomous_cve" / "run_fault_matrix.py"
|
|
580
|
+
if not fault_script.is_file():
|
|
581
|
+
fault_script = REPO_ROOT / "scripts" / "cve" / "run_fault_matrix.py"
|
|
579
582
|
rc, out, err = _run(
|
|
580
|
-
[sys.executable, str(
|
|
583
|
+
[sys.executable, str(fault_script),
|
|
581
584
|
"--sandbox", str(sandbox), "--output", str(receipt), "--json"],
|
|
582
585
|
cwd=REPO_ROOT, timeout=600.0,
|
|
583
586
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BugX Supervisor (并发协调与智能体调度仲裁中心)
|
|
2
2
|
|
|
3
|
-
> **版本契约**: `0.1.
|
|
3
|
+
> **版本契约**: `0.1.6` | **所属分层**: `Layer 3: 并发协调、智能体编排与账本`
|
|
4
4
|
> **工程规范**: 参见 [`docs/02_architecture/05_ARCH_NOMENCLATURE_GUIDE.md`](../../docs/02_architecture/05_ARCH_NOMENCLATURE_GUIDE.md)
|
|
5
5
|
> **守卫机制**: `scripts/verify_directory_indices.py` (100% 物理条目索引覆盖)
|
|
6
6
|
|
|
@@ -11,6 +11,7 @@ from __future__ import annotations
|
|
|
11
11
|
import hashlib
|
|
12
12
|
import os
|
|
13
13
|
import shlex
|
|
14
|
+
import shutil
|
|
14
15
|
import signal
|
|
15
16
|
import subprocess
|
|
16
17
|
import tempfile
|
|
@@ -74,6 +75,10 @@ def _validate_command(command: Sequence[str]) -> list[str]:
|
|
|
74
75
|
argv = list(command)
|
|
75
76
|
if not argv or any(not isinstance(item, str) or not item for item in argv):
|
|
76
77
|
raise WorkerExecutionError("command 必须是非空字符串数组")
|
|
78
|
+
if os.name == "nt" and argv:
|
|
79
|
+
resolved_exe = shutil.which(argv[0])
|
|
80
|
+
if resolved_exe:
|
|
81
|
+
argv[0] = resolved_exe
|
|
77
82
|
return argv
|
|
78
83
|
|
|
79
84
|
|
|
@@ -4,23 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
# BugX — Autonomous Code Review & Automated Testing Agent
|
|
6
6
|
|
|
7
|
-
BugX is an autonomous code review and automated testing agent that
|
|
7
|
+
BugX is an **autonomous code review and automated testing agent** that runs inside AI coding assistants and CLI workflows.
|
|
8
8
|
|
|
9
|
-
**It
|
|
10
|
-
- **For Developers**: Catches subtle, high-impact bugs immediately after code is written, eliminating painful debugging loops and rework.
|
|
11
|
-
- **For QA & Test Engineers**: Automates black-box, functional, and performance testing across complex edge cases that manual reviews often miss.
|
|
12
|
-
- **For Engineering Teams**: Guarantees code strictly meets functional contracts with rock-solid stability and resilience, ensuring dependable, crash-free releases.
|
|
13
|
-
|
|
14
|
-
By replacing subjective self-reporting with automated, evidence-backed audits, BugX accelerates release velocity, elevates software quality, and reduces long-term maintenance costs. Supported environments include **Claude Code, OpenAI Codex, Cursor, Trae, Windsurf, Kimi Code, MiniMax Code, OpenCode, ZCode, Cline, DeepSeek Harness (DSH), WorkBuddy, and Qoder**.
|
|
9
|
+
It partitions codebases into deterministic audit units, orchestrates concurrent Workers to explore complex logic branches and edge cases, and deploys isolated verifiers to **execute sandboxed PoCs for real bug confirmation**. It eliminates AI hallucinations, premature "all good" claims, and false alarms, ensuring robust, crash-free software releases.
|
|
15
10
|
|
|
16
11
|
<p align="center">
|
|
17
|
-
<a href="https://www.npmjs.com/package/bugx-cli"><img src="https://img.shields.io/npm/v/bugx-cli.svg?style=flat&color=0284c7&label=npm" alt="npm version"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/bugx-cli"><img src="https://img.shields.io/npm/v/bugx-cli.svg?style=flat&color=0284c7&label=npm%20version" alt="npm version"></a>
|
|
18
13
|
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-334155.svg?style=flat" alt="Node.js"></a>
|
|
19
|
-
<a href="LICENSE"><img src="https://img.shields.io/badge/license-BSL--1.1-334155.svg?style=flat" alt="License: BSL-1.1"></a>
|
|
14
|
+
<a href="https://github.com/Bencibr/bugx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSL--1.1-334155.svg?style=flat" alt="License: BSL-1.1"></a>
|
|
20
15
|
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-334155.svg?style=flat" alt="Platform">
|
|
21
16
|
</p>
|
|
22
17
|
|
|
23
|
-
🌐 Website · 官网:**https://bugx.dev**
|
|
18
|
+
🌐 Website · 官网:**https://bugx.dev** · GitHub:**https://github.com/Bencibr/bugx**
|
|
24
19
|
|
|
25
20
|
<p align="center">
|
|
26
21
|
<a href="#-english-documentation">English</a> •
|
|
@@ -31,256 +26,140 @@ By replacing subjective self-reporting with automated, evidence-backed audits, B
|
|
|
31
26
|
|
|
32
27
|
## English Documentation
|
|
33
28
|
|
|
34
|
-
###
|
|
35
|
-
|
|
36
|
-
AI writes code faster than any human can review it, and the model carries a training-level bias toward sounding done rather than being done:
|
|
37
|
-
|
|
38
|
-
1. **The grader rewards confidence.** Human raters score "I checked it carefully, nothing found" higher than "I haven't finished reading the files." The model learns to report good news.
|
|
39
|
-
2. **Checking is expensive; claiming is cheap.** Reading hundreds of files takes real work. Replying "no issues found" takes a few words.
|
|
40
|
-
3. **It doesn't know what it hasn't checked.** The model cannot see its own coverage gaps and will not say "half done."
|
|
41
|
-
|
|
42
|
-
BugX counters this with a ledger and four hard rules: a per-unit coverage list (checked / blocked / pending), mandatory reproduction (the same attack input must trigger the finding twice and a clean input must trigger nothing), crash-resumable audits, and hash-chained records that keep every verdict reviewable.
|
|
43
|
-
|
|
44
|
-
### What BugX does
|
|
45
|
-
|
|
46
|
-
- **AI code review** — bugs and defects classified by logic, state, boundary, exception, concurrency, performance, and resource handling.
|
|
47
|
-
- **Functionality review** — a behavior diff: the same inputs go to your implementation and a reference implementation, and the differences are reported.
|
|
48
|
-
- **Performance and memory checks** — performance and resource defects, plus dedicated memory inspection for native, Python, JVM, Electron, Android, and Apple targets.
|
|
49
|
-
- **UI audit** — layout, contrast, keyboard paths, and design tokens on a running web page (`bugx probe ui`).
|
|
50
|
-
- **Reproducible findings & blind verification** — every vulnerability is blind-reviewed by an independent verifier with a reproduction command or PoC; verified with AST negative control assertions; refuted cases are logged to the FP Ledger.
|
|
51
|
-
- **Prompt Policy Engine** — declarative prompt profiles adapt to model-specific safety filters (e.g. OpenAI Cyber Risk / Daybreak) without losing code fidelity.
|
|
52
|
-
- **Mutation-verified tests** — `bugx test-verify` mutates your code to check whether the tests actually catch the bugs.
|
|
53
|
-
- **Patch bundles** — `bugx patch-forge` builds a patch with static checks and hands it to you for review; it never commits on its own.
|
|
54
|
-
- **Lessons base and unattended runs** — `bugx lesson` / `bugx knowledge` accumulate project and global experience; `bugx autonomous` and `bugx goal` run end-to-end audits without supervision.
|
|
55
|
-
|
|
56
|
-
### BugX Studio
|
|
57
|
-
|
|
58
|
-
BugX ships with a built-in web console. Run `bugx report serve` and open http://127.0.0.1:8080:
|
|
59
|
-
|
|
60
|
-
<p align="center">
|
|
61
|
-
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-studio.jpg" alt="BugX Studio workbench" width="860">
|
|
62
|
-
</p>
|
|
63
|
-
|
|
64
|
-
Every connected host keeps its own audit sessions (ChatGPT, ZCode, Claude, Codex, DSH, OpenCode, Pi, and more):
|
|
65
|
-
|
|
66
|
-
<p align="center">
|
|
67
|
-
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-chatgpt.jpg" alt="ChatGPT workspace" width="420">
|
|
68
|
-
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-zcode.jpg" alt="ZCode workspace" width="420">
|
|
69
|
-
</p>
|
|
70
|
-
|
|
71
|
-
The skill marketplace ships with `/audit` (one-shot full-surface audit with a dual-track report), `/review` (structured findings for branch changes), `/mining` (attack-surface survey and hardening), `/fix` (defensive patches with sandboxed regression), and `/test` (AAA tests with mutation-kill scoring):
|
|
29
|
+
### ✨ Key Features
|
|
72
30
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
31
|
+
- 🛡️ **Real Execution Verification (Zero False Alarms)**: Suspected flaws are verified in an isolated sandbox with dual positive tests and a clean negative control. Every finding carries executable PoC commands, exit codes, and output hashes.
|
|
32
|
+
- 📋 **Ledger-Tracked State Machine Coverage**: Codebases are decomposed into atomic units (covered / blocked / pending). Audits resume seamlessly across sessions, and completion is determined by ledger state—not conversational claims.
|
|
33
|
+
- 🔌 **Universal Host Integration via MCP / ACP**: Seamlessly plugs into Google Antigravity, Claude Code, Cursor, Trae, OpenAI Codex, Kimi Code, MiniMax Code, and ZCode. Fully supports Gemini 4, Claude 5.5, and GPT-4o models.
|
|
34
|
+
- 📊 **Built-in Web Studio Dashboard**: Live interactive web interface (`bugx report serve`) visualizing coverage status, call chains, PoC proof artifacts, and mutation test efficacy.
|
|
76
35
|
|
|
77
|
-
### Quick
|
|
36
|
+
### 🚀 Quick Start
|
|
78
37
|
|
|
79
|
-
|
|
38
|
+
#### 1. Installation
|
|
80
39
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npx bugx-cli --version
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Or install globally** (pick your package manager):
|
|
40
|
+
Requires Node.js `>=18`. Python `>=3.11` is detected and managed automatically by the wrapper.
|
|
88
41
|
|
|
89
42
|
```bash
|
|
43
|
+
# Global install (choose your preferred package manager):
|
|
90
44
|
npm install -g bugx-cli
|
|
91
45
|
# pnpm add -g bugx-cli
|
|
92
46
|
# yarn global add bugx-cli
|
|
93
47
|
# bun add -g bugx-cli
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
After installing, run this from the repository you want to use:
|
|
97
48
|
|
|
98
|
-
|
|
99
|
-
bugx
|
|
100
|
-
bugx doctor --strict # health diagnostics
|
|
49
|
+
# Or check version directly via npx:
|
|
50
|
+
npx bugx-cli --version
|
|
101
51
|
```
|
|
102
52
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
To install everywhere at once: `bugx install --agent all`.
|
|
106
|
-
|
|
107
|
-
Sign in with `bugx auth login --root .`, then check the expected account and `auth_verified=true` with `bugx auth status --root . --verify --json`. Confirm which data may sync before enabling the project. If both the account-wide and project scopes are authorized, initialize a fresh project with `bugx init --root . --cloud-sync sync` and verify the transfer with `bugx cloud sync --root . --scope all`. Decline partial-sync requests. For existing projects and sync errors, see the [user guide](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/01_USER_GUIDE.md#3-初始化项目).
|
|
108
|
-
|
|
109
|
-
Use `bugx engine --root . status --json` to check the current stage. After review and settlement, sync newly recorded lessons and experience in the same scope and check `bugx cloud status --root . --scope all --json`.
|
|
110
|
-
|
|
111
|
-
**Option 1 — inside your AI assistant (recommended).** Open Claude Code, Codex, Cline, OpenCode, or ZCode in any project and just tell it what to check:
|
|
112
|
-
|
|
113
|
-
**ZCode**
|
|
114
|
-

|
|
115
|
-
|
|
116
|
-
**Codex**
|
|
117
|
-

|
|
53
|
+
#### 2. Configure Your AI Host
|
|
118
54
|
|
|
119
|
-
|
|
120
|
-

|
|
121
|
-
|
|
122
|
-
> "Audit this project"
|
|
123
|
-
> "Check the login module for vulnerabilities"
|
|
124
|
-
> "Review the changes on this branch for security issues"
|
|
125
|
-
|
|
126
|
-
**Option 2 — from the terminal.** The AI still comes from your installed hosts: BugX reuses the model and credentials you already configured there and never takes over your API keys.
|
|
55
|
+
Run this command once in your user home directory or target project root:
|
|
127
56
|
|
|
128
57
|
```bash
|
|
129
|
-
bugx
|
|
130
|
-
bugx goal --host opencode "audit this project's login and payment flows"
|
|
131
|
-
|
|
132
|
-
bugx report serve # live web console at http://127.0.0.1:8080
|
|
133
|
-
bugx report both --format html --out report.html # offline archive
|
|
58
|
+
bugx install
|
|
134
59
|
```
|
|
135
60
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
| Command | What it does |
|
|
139
|
-
| :--- | :--- |
|
|
140
|
-
| `bugx install` | register the BugX MCP servers with detected AI hosts |
|
|
141
|
-
| `bugx hosts` | list every AI environment detected on this machine |
|
|
142
|
-
| `bugx doctor --strict` | health diagnostics for installation and connectivity |
|
|
143
|
-
| `bugx engine pre / status / post` | run and settle a structured audit lifecycle |
|
|
144
|
-
| `bugx autonomous --host <host>` | full unattended audit through your host |
|
|
145
|
-
| `bugx goal --host <host> "<target>"` | audit toward a stated target |
|
|
146
|
-
| `bugx report serve` | live web console (BugX Studio) |
|
|
147
|
-
| `bugx report both --format html` | export the formal + visual report |
|
|
148
|
-
| `bugx probe ui --url <url>` | audit a running web UI |
|
|
149
|
-
| `bugx test-generate` | generate AAA tests or a self-contained PoC |
|
|
150
|
-
| `bugx test-verify` | prove your tests catch real bugs via mutation |
|
|
151
|
-
| `bugx patch-forge` | build a reviewed patch bundle |
|
|
152
|
-
| `bugx lesson` / `bugx knowledge` | project and global experience base |
|
|
153
|
-
| `bugx daemon` | resident watchdog for unattended audits |
|
|
154
|
-
|
|
155
|
-
### Supported AI coding tools
|
|
156
|
-
|
|
157
|
-
| AI coding tool | Integration | Install |
|
|
158
|
-
| :--- | :--- | :--- |
|
|
159
|
-
| Claude Code | native MCP / autonomous lifecycle | `bugx install --agent claude` |
|
|
160
|
-
| OpenAI Codex | workspace subagents / native plugin | `bugx install --agent codex` |
|
|
161
|
-
| OpenCode | headless ACP / native MCP | `bugx install --agent opencode` |
|
|
162
|
-
| Cline / Roo Code | MCP sessions (serial) / CLI process-pool concurrency | `bugx install --agent cline` |
|
|
163
|
-
| ZCode | native MCP / user-level MCP registration | `bugx install --agent zcode` |
|
|
164
|
-
|
|
165
|
-
DeepSeek Harness (DSH), WorkBuddy, Cursor / Windsurf, and more are being adapted. Run `bugx hosts` to list everything detected on this machine.
|
|
166
|
-
|
|
167
|
-
### Security and privacy
|
|
168
|
-
|
|
169
|
-
- Project state lives in the project's `.bugx/` directory; the global engine, credentials, knowledge base, and caches live in a user-level BugX directory.
|
|
170
|
-
- Credentials are written to a controlled sandbox when needed (readable only by the current user by default). `bugx auth status` reports whether credentials exist — it never prints them.
|
|
171
|
-
- Knowledge sync uses the configured scope and sensitive-data policy. Bundle uploads, diagnostic log reports, and feedback have separate commands and data boundaries.
|
|
172
|
-
- `reset` / `uninstall` / `purge` / `--no-backup` delete data. Check each command's dry-run and backup behavior first.
|
|
173
|
-
|
|
174
|
-
### FAQ
|
|
175
|
-
|
|
176
|
-
**What is BugX?**
|
|
177
|
-
An autonomous code-audit agent for AI-written code. It runs inside AI coding assistants (via MCP) or as a CLI, tracks audit coverage per unit, and verifies every finding by executing it.
|
|
61
|
+
> 💡 **Tip**: After installation, **completely restart your host IDE / AI assistant** (Cursor, Claude Code, Antigravity, etc.).
|
|
178
62
|
|
|
179
|
-
|
|
180
|
-
Rather than trusting the proposing model's self-report, findings are independently blind-reviewed: an attack input must reliably trigger the vulnerability twice, and a clean input must trigger zero times (two positive runs, one negative control) recorded with command, exit code, and artifact hashes, verified by AST syntax assertions. Refuted findings are recorded in the FP Ledger.
|
|
63
|
+
### 💬 How to Use
|
|
181
64
|
|
|
182
|
-
**
|
|
183
|
-
|
|
65
|
+
- **Inside your AI assistant (Recommended)**: Open Cursor, Claude Code, Antigravity, or ZCode, and prompt:
|
|
66
|
+
> "Audit this project"
|
|
67
|
+
> "Check the authentication service for concurrency issues and exception leaks"
|
|
68
|
+
- **Autonomous CLI execution**:
|
|
69
|
+
```bash
|
|
70
|
+
bugx autonomous --host opencode # Autonomous audit
|
|
71
|
+
bugx report serve # Live web dashboard at http://127.0.0.1:8080
|
|
72
|
+
```
|
|
184
73
|
|
|
185
|
-
|
|
186
|
-
The audit runs locally. When you enable lesson and experience sync, startup and eligible ledger writes can trigger cloud transfers. The authorized scope and sensitive-data policy govern the records sent.
|
|
74
|
+
### 🖥️ BugX Studio Web Dashboard
|
|
187
75
|
|
|
188
|
-
|
|
189
|
-
No. It gives you a reviewable ledger — what was checked, what wasn't, and reproducible evidence per finding — so human review starts from facts instead of the model's self-report.
|
|
76
|
+
Run `bugx report serve` to inspect audit topology, evidence chains, and verified findings:
|
|
190
77
|
|
|
191
|
-
|
|
192
|
-
|
|
78
|
+
<p align="center">
|
|
79
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-studio.jpg" alt="BugX Studio workbench" width="860">
|
|
80
|
+
</p>
|
|
193
81
|
|
|
194
|
-
###
|
|
82
|
+
### 🔌 Supported AI Coding Hosts
|
|
195
83
|
|
|
196
|
-
|
|
84
|
+
| Host Assistant | Integration Protocol | Setup Command |
|
|
85
|
+
| :--- | :--- | :--- |
|
|
86
|
+
| **Google Antigravity** | Native Agent/Worker, Skill, Project MCP | `bugx install --agent antigravity` |
|
|
87
|
+
| **Claude Code** | Native MCP / Autonomous Lifecycle | `bugx install --agent claude` |
|
|
88
|
+
| **OpenAI Codex** | Workspace Sub-Agent / Native Plugin | `bugx install --agent codex` |
|
|
89
|
+
| **OpenCode** | Native ACP / Multi-Agent Concurrency / Project MCP | `bugx install --agent opencode` |
|
|
90
|
+
| **Cline / Roo Code** | Isolated Data Sandbox / Project Agent / User MCP | `bugx install --agent cline` |
|
|
91
|
+
| **Qoder AI** | Native Agent/Worker, Subagent Concurrency, User/Project MCP | `bugx install --agent qoder` |
|
|
92
|
+
| **Trae / Trae CN** | Project Agent, Multi-variant MCP Sync Mirror | `bugx install --agent trae` |
|
|
93
|
+
| **DeepSeek Harness (DSH)** | Native Headless Profile / Cordis Patch / MCP Injection | `bugx install --agent dsh` |
|
|
94
|
+
| **Kimi Code** | Headless ACP / Native MCP Plugin | `bugx install --agent kimi` |
|
|
95
|
+
| **MiniMax Code** | Custom Agent, Plugin V1 Worker, Skill & MCP | `bugx install --agent minimax` |
|
|
96
|
+
| **ZCode** | Native MCP / User-Level Registry | `bugx install --agent zcode` |
|
|
97
|
+
| **Agnes Code** | Terminal Native TUI / Agent MCP Injection | `bugx install --agent agnescode` |
|
|
98
|
+
| **WorkBuddy / CodeBuddy** | Native Skill, Desktop Multi-variant Mirror, Project MCP | `bugx install --agent workbuddy` |
|
|
99
|
+
| **GitHub Copilot** | Project Agent/Instructions, User Agent, Project MCP | `bugx install --agent copilot` |
|
|
100
|
+
| **Cursor / Windsurf** | Standard User/Project MCP Integration | `bugx install` (auto-detected) |
|
|
101
|
+
|
|
102
|
+
### 🔍 Keywords
|
|
103
|
+
|
|
104
|
+
Google Antigravity · Gemini 4 · Gemini 4 Carbon · Gemini 4 Neon · Gemini Code Assist · G4 Model · Claude 5.5 · Claude Sonnet 5.5 · Claude Opus 5.5 · Claude Code Audit · GPT-4o Code Review · Autonomous Code Review · Automated Code Audit · AI Code Review · Code Review Agent · AI Agent · Vibe Coding Security · PR Review · Zero False Positive · PoC Verification · Blind Verification · Security Audit · Vulnerability Scanner · Static Analysis · MCP Server · MCP Security · Cursor · Windsurf · Trae · OpenAI Codex · OpenCode · Cline · Qoder · GitHub Copilot · DeepSeek Harness · Behavior Diff · Memory Leak Detection · Python Security · JavaScript Security · DevSecOps
|
|
197
105
|
|
|
198
106
|
---
|
|
199
107
|
|
|
200
108
|
## 简体中文说明
|
|
201
109
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
BugX 是装进 AI 编程助手的**自动代码审计与自动化 Code Review 智能体(Agent)**。它对 AI 写出的代码做端到端自动化审计与代码审查:把项目拆成覆盖清单、派发并发审计 Worker、对每条候选漏洞做真实执行验证,最终产出一份详实的审计报告——每条漏洞都附带一条你可以亲手运行的复现命令。
|
|
205
|
-
|
|
206
|
-
如果你的生产代码来自 AI 编程工具,BugX 就是那个专注于**自动代码审计**、**Code Review** 与安全加固的智能体层:它核查模型**实际交付了什么**,而不是模型**声称交付了什么**。
|
|
207
|
-
|
|
208
|
-
### 为什么 AI 代码需要审计
|
|
209
|
-
|
|
210
|
-
AI 写代码的速度远超人工审查,而且模型带着训练层面的偏差——听起来做完了,比真的做完了更容易:
|
|
110
|
+
BugX 是一款装在 AI 编程助手与终端里的**自主代码审查与自动化测试智能体(Autonomous Agent)**。
|
|
211
111
|
|
|
212
|
-
|
|
213
|
-
2. **检查贵,声称便宜。** 读几百个文件是体力活,回一句「没发现问题」只要几个字。
|
|
214
|
-
3. **它不知道自己没查完。** 模型看不见自己的覆盖盲区,也不会说「做了一半」。
|
|
112
|
+
它通过确定性任务账本将待审项目拆解为独立单元,由并发 Worker 深入代码逻辑、边界分支与并发场景,并通过隔离的验证员**在沙箱中真实执行 PoC 验证漏洞**。彻底解决大模型“口头宣布查完、遇到长代码爱偷懒跳过、凭空脑补假漏洞”的问题,让代码交付透明、可查、上线不翻车。
|
|
215
113
|
|
|
216
|
-
|
|
114
|
+
### ✨ 核心特性
|
|
217
115
|
|
|
218
|
-
|
|
116
|
+
- 🛡️ **真实执行验证(零误报承诺)**:疑似缺陷由独立沙箱执行“双正例触发 + 单负对照零触发”实跑验证,带完整命令、退出码与终端回显证据留案,杜绝凭空臆测与假报警。
|
|
117
|
+
- 📋 **状态机覆盖账本(杜绝偷懒跳过)**:以状态机跟踪全项目审计单元(已覆盖 / 阻塞 / 待审),断点可续,审查完成与否以账本终态为准,模型的口头承诺不算数。
|
|
118
|
+
- 🔌 **全生态宿主即插即用**:基于标准 MCP / ACP 协议,原生适配 Google Antigravity、Claude Code、Cursor、Trae、OpenAI Codex、OpenCode、Cline、Qoder、Kimi、MiniMax、ZCode 等,深度支持 Gemini 4、Claude 5.5 与 GPT-4o 底座。
|
|
119
|
+
- 📊 **自带全息 Web 工作台**:内置 Studio 交互看板,实时追踪审计拓扑、漏洞调用链、复现凭据与测试变异杀伤力。
|
|
219
120
|
|
|
220
|
-
|
|
121
|
+
### 🚀 快速开始
|
|
221
122
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
npx bugx-cli --version
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**或全局安装:**
|
|
123
|
+
#### 1. 安装 (Node.js >= 18)
|
|
229
124
|
|
|
230
125
|
```bash
|
|
231
126
|
npm install -g bugx-cli
|
|
127
|
+
# 或
|
|
128
|
+
npx bugx-cli --version
|
|
232
129
|
```
|
|
233
130
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
bugx install # 列出检测到的 AI 宿主并注册 BugX MCP 服务
|
|
238
|
-
bugx doctor --strict # 健康自检
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
一次装全所有宿主:`bugx install --agent all`。
|
|
242
|
-
|
|
243
|
-
在目标仓库运行 `bugx auth login --root .`,再用 `bugx auth status --root . --verify --json` 核对账号和 `auth_verified=true`。确认同步范围和敏感数据策略后再开启同步。两层都已授权且为全新项目时,用 `bugx init --root . --cloud-sync sync` 初始化,然后用 `bugx cloud sync --root . --scope all` 验证首次推拉。只授权部分数据时停止同步。已有项目或同步失败时,参照[用户指南](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/01_USER_GUIDE.md#3-初始化项目)。
|
|
244
|
-
|
|
245
|
-
用 `bugx engine --root . status --json` 查看当前阶段。审查收尾后,按同一授权范围同步本轮录入的错题和经验,再用 `bugx cloud status --root . --scope all --json` 核对绑定与同步状态。
|
|
131
|
+
#### 2. 一键配置 AI 宿主
|
|
246
132
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
> 「审计一下这个项目」
|
|
250
|
-
> 「查一下登录模块有没有漏洞」
|
|
251
|
-
|
|
252
|
-
宿主里的 AI 会自动调用 BugX:建覆盖清单、派发并发 Worker、跑探针、验证漏洞、出报告。想实时看,终端跑 `bugx report serve`,浏览器打开 http://127.0.0.1:8080。
|
|
253
|
-
|
|
254
|
-
**方式二:命令行直接跑。** AI 同样来自你已装好的宿主——模型和凭据直接复用,不接管你的 Key。
|
|
133
|
+
在用户主目录或目标仓库下运行,自动识别并配置本机已有的 AI 编程助手:
|
|
255
134
|
|
|
256
135
|
```bash
|
|
257
|
-
bugx
|
|
258
|
-
bugx report serve # 实时 Web 报告 http://127.0.0.1:8080
|
|
136
|
+
bugx install
|
|
259
137
|
```
|
|
260
138
|
|
|
261
|
-
|
|
139
|
+
> 💡 **提示**:安装完成后请**完全退出并重启你的 AI 编程助手/IDE**。
|
|
262
140
|
|
|
263
|
-
|
|
264
|
-
| :--- | :--- | :--- |
|
|
265
|
-
| Claude Code | 原生 MCP / 自治生命周期 | `bugx install --agent claude` |
|
|
266
|
-
| OpenAI Codex | 工作区子 Agent / 原生插件 | `bugx install --agent codex` |
|
|
267
|
-
| OpenCode | Headless ACP / 原生 MCP | `bugx install --agent opencode` |
|
|
268
|
-
| Cline / Roo Code | MCP 会话(串行)/ CLI 多进程池并发 | `bugx install --agent cline` |
|
|
269
|
-
| ZCode | 原生 MCP / 用户级注册 | `bugx install --agent zcode` |
|
|
141
|
+
### 💬 使用方式
|
|
270
142
|
|
|
271
|
-
|
|
143
|
+
- **方式一:在 AI 助手里直接对话(推荐)**:打开 Cursor、Claude Code、Antigravity、ZCode 等,对它说:
|
|
144
|
+
> “审计这个项目”
|
|
145
|
+
> “检查登录模块是否存在并发安全漏洞或异常吞噬”
|
|
146
|
+
- **方式二:命令行自主长跑**:
|
|
147
|
+
```bash
|
|
148
|
+
bugx autonomous --host opencode # 全自动闭环审计
|
|
149
|
+
bugx report serve # 启动本地实时 Web 看板 (http://127.0.0.1:8080)
|
|
150
|
+
```
|
|
272
151
|
|
|
273
|
-
###
|
|
152
|
+
### 📚 文档与支持
|
|
274
153
|
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
-
|
|
154
|
+
- [用户完整指南](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/01_USER_GUIDE.md)
|
|
155
|
+
- [命令手册 (CLI Reference)](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/02_COMMANDS.md)
|
|
156
|
+
- [宿主矩阵与分发指南](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/05_HOST_MATRIX_AND_DISPATCH.md)
|
|
157
|
+
- [故障排查手册](https://github.com/Bencibr/bugx/blob/main/docs/01_guides/03_TROUBLESHOOTING.md)
|
|
279
158
|
|
|
280
|
-
###
|
|
159
|
+
### 🔍 搜索关键词 (Keywords)
|
|
281
160
|
|
|
282
|
-
自动代码审计 · AI 代码审计 · 自动化 Code Review · Code Review · 代码审查 Agent · 代码审计智能体 · AI Agent · Vibe Coding 安全 · 氛围编程审计 · PR 自动审查 · 零误报 · 真实 PoC 复现 · 盲审验证 · 安全审计 · 漏洞扫描 · 漏洞挖掘 · 静态分析 · MCP 服务 · MCP 安全 ·
|
|
161
|
+
Google Antigravity · 反重力 · 反重力智能体 · Gemini 4 · Gemini 4 Carbon · Gemini 4 Neon · Gemini · Gemini 编程助手 · Gemini Code Assist · G4 模型 · Claude 5.5 · Claude Sonnet 5.5 · Claude Opus 5.5 · Claude Code 审计 · GPT-4o 代码审计 · 自动代码审计 · AI 代码审计 · 自动化 Code Review · Code Review · 代码审查 Agent · 代码审计智能体 · AI Agent · Vibe Coding 安全 · 氛围编程审计 · PR 自动审查 · 零误报 · 真实 PoC 复现 · 盲审验证 · 安全审计 · 漏洞扫描 · 漏洞挖掘 · 静态分析 · MCP 服务 · MCP 安全 · Cursor 审计 · Windsurf 审计 · Trae 审计 · Codex 审计 · OpenCode 审计 · Cline 审计 · Qoder 审计 · DeepSeek Harness 审计 · 编程助手安全 · 自主审计 · 行为差分 · 内存泄漏检测 · Python 安全 · JavaScript 安全 · DevSecOps
|
|
283
162
|
|
|
284
|
-
|
|
163
|
+
### 📄 License
|
|
285
164
|
|
|
286
|
-
[Business Source License 1.1](https://github.com/Bencibr/bugx/blob/main/LICENSE)
|
|
165
|
+
Licensed under the [Business Source License 1.1](https://github.com/Bencibr/bugx/blob/main/LICENSE).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bencibro/bugx-dsh-mcp-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Session-aware BugX MCP bridge for DeepSeek Harness.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@deepseek-ai/dsh-subprocess": "^0.1.1-rc.2",
|
|
17
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.1-rc.2 || ^0.2.0-rc.1",
|
|
18
18
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
19
19
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
20
20
|
"zod": "^4.4.3"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"description_en": "BugX is an autonomous code review and testing agent designed to safeguard software delivery: it surfaces hidden, deep bugs for developers right after writing code to eliminate painful debugging and rework; automates black-box, functional, and performance testing across complex edge cases for QA; and ensures software strictly meets functional requirements with rock-solid stability and resilience. By taking over tedious verification, BugX frees engineers from manual grunt work, boosts team velocity, elevates code quality, and significantly lowers long-term maintenance costs—putting technology to work for people.",
|
|
8
8
|
"source": "bugx-agent",
|
|
9
9
|
"type": "mcp-connector",
|
|
10
|
-
"version": "0.1.
|
|
10
|
+
"version": "0.1.6",
|
|
11
11
|
"homepage": "https://bugx.dev",
|
|
12
12
|
"website": "https://bugx.dev",
|
|
13
13
|
"examples_zh": [
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"description_en": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
|
|
8
8
|
"source": "bugx-agent",
|
|
9
9
|
"type": "skill-only",
|
|
10
|
-
"version": "0.1.
|
|
10
|
+
"version": "0.1.6",
|
|
11
11
|
"examples_zh": [
|
|
12
12
|
"运行代码审查,排查深层 Bug 与性能隐患",
|
|
13
13
|
"自动化运行功能验证与黑盒测试"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bugx
|
|
3
3
|
description: BugX 是一个具备自主代码审查与测试能力的智能体,严把代码交付关:它帮助开发人员在写完代码后自动排查隐藏的深层 Bug,减少反复排错与返工;帮助测试人员自动化运行黑盒测试、功能验证与性能测试,自动覆盖手工盲测难以覆盖的极端场景;确保代码功能符合要求、具备良好的健壮性和稳定性。让开发和测试在繁琐的工作中解放双手,大幅提高工作效率、全面提升代码质量、显著降低后期维护成本,实现科技服务于人。
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
author: BugX
|
|
6
6
|
---
|
|
7
7
|
<!-- bugx-locale: zh-CN -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bugx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"bugx_build_id": 98,
|
|
5
5
|
"description": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
|
|
6
6
|
"author": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bugx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
|
|
5
5
|
"skills": "./skills/",
|
|
6
6
|
"homepage": "https://bugx.dev",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bugx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Autonomous code review and testing agent. Catches hidden deep bugs for developers, automates black-box, functional, and performance testing for QA, and ensures rock-solid software delivery.",
|
|
5
5
|
"homepage": "https://bugx.dev",
|
|
6
6
|
"author": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: bugx
|
|
3
3
|
description: BugX 是一个具备自主代码审查与测试能力的智能体,严把代码交付关:它帮助开发人员在写完代码后自动排查隐藏的深层 Bug,减少反复排错与返工;帮助测试人员自动化运行黑盒测试、功能验证与性能测试,自动覆盖手工盲测难以覆盖的极端场景;确保代码功能符合要求、具备良好的健壮性和稳定性。让开发和测试在繁琐的工作中解放双手,大幅提高工作效率、全面提升代码质量、显著降低后期维护成本,实现科技服务于人。
|
|
4
4
|
metadata:
|
|
5
|
-
bugx_version: "0.1.
|
|
5
|
+
bugx_version: "0.1.6"
|
|
6
6
|
---
|
|
7
7
|
<!-- bugx-locale: zh-CN -->
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
BugX ChatGPT Skill 镜像。执行前用 `bugx engine path --name AGENT_GUIDE.md` 和 `bugx engine path --name bugx.md` 读取全局协议;项目 `.bugx/` 只保存状态与配置。
|
|
12
12
|
|
|
13
|
-
协议镜像版本:0.1.
|
|
13
|
+
协议镜像版本:0.1.6
|
|
14
14
|
|
|
15
15
|
## ChatGPT 原生交互适配(强制)
|
|
16
16
|
|
|
@@ -4244,6 +4244,24 @@ def _check_host_mcp_config(root: Path, host_name: str, *, repair: bool = False)
|
|
|
4244
4244
|
detail += ";Agent 入口存在但不能替代 Trea MCP 配置"
|
|
4245
4245
|
return False, detail + ";请运行 bugx install --agent trea"
|
|
4246
4246
|
|
|
4247
|
+
if host_name == "copilot":
|
|
4248
|
+
candidates = (
|
|
4249
|
+
(root / ".vscode" / "mcp.json", "mcpServers"),
|
|
4250
|
+
(root / ".mcp.json", "flat"),
|
|
4251
|
+
)
|
|
4252
|
+
ok, detail = _validate_host_supervisor_mcp(candidates, root)
|
|
4253
|
+
project_entry = root / ".github" / "agents" / "bugx.agent.md"
|
|
4254
|
+
instructions_entry = root / ".github" / "copilot-instructions.md"
|
|
4255
|
+
user_entry = Path.home() / ".copilot" / "agents" / "bugx.agent.md"
|
|
4256
|
+
has_entry = (project_entry.is_file() and instructions_entry.is_file()) or user_entry.is_file()
|
|
4257
|
+
if ok and has_entry:
|
|
4258
|
+
return True, detail + ";GitHub Copilot Agent/MCP 入口已就绪"
|
|
4259
|
+
if not has_entry:
|
|
4260
|
+
detail += ";缺少 .github/agents/bugx.agent.md 或 .github/copilot-instructions.md"
|
|
4261
|
+
elif not ok:
|
|
4262
|
+
detail += ";Agent 入口存在但缺少 .vscode/mcp.json 配置"
|
|
4263
|
+
return False, detail + ";请运行 bugx install --agent copilot"
|
|
4264
|
+
|
|
4247
4265
|
if host_name == "pi":
|
|
4248
4266
|
ext_manifest = root / ".pi" / "extensions" / "bugx" / "manifest.json"
|
|
4249
4267
|
skill_file = root / ".pi" / "skills" / "bugx" / "SKILL.md"
|
|
@@ -331,10 +331,8 @@ def _command_audit_penetration(args: argparse.Namespace) -> int:
|
|
|
331
331
|
from ..infra.security import _find_repo_root
|
|
332
332
|
repo_root = _find_repo_root(Path(__file__))
|
|
333
333
|
core_root = repo_root / "core"
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
if str(p) not in sys.path:
|
|
337
|
-
sys.path.insert(0, str(p))
|
|
334
|
+
if str(core_root) not in sys.path:
|
|
335
|
+
sys.path.insert(0, str(core_root))
|
|
338
336
|
|
|
339
337
|
from core.infra.build_info import get_full_version_string
|
|
340
338
|
from core.probes.sast_probe import run_scan as run_sast_scan
|
|
@@ -350,7 +348,7 @@ def _command_audit_penetration(args: argparse.Namespace) -> int:
|
|
|
350
348
|
)
|
|
351
349
|
# 脚本已随 DOC-232 迁入 ``scripts/cve/``:旧路径 ``run_six_worker_penetration``
|
|
352
350
|
# 从仓库根已不可导入,``bugx audit --deep`` 会直接 fail-closed。包名显式写全。
|
|
353
|
-
from
|
|
351
|
+
from core.autonomous_cve.run_six_worker_penetration import run_six_worker_penetration
|
|
354
352
|
from core.report_engine.models import (
|
|
355
353
|
_compliance_notes as get_compliance_notes,
|
|
356
354
|
_remediation_roadmap as build_remediation_roadmap,
|
|
@@ -1164,7 +1164,7 @@ def _repair_active_host_mcp_config(
|
|
|
1164
1164
|
write_host_mcp_config(root, host_name)
|
|
1165
1165
|
elif not is_home_scope and host_name == "opencode":
|
|
1166
1166
|
_ensure_opencode_config(root)
|
|
1167
|
-
elif not is_home_scope and host_name in {"claude", "codex", "cline", "trea", "funide", "qoder"}:
|
|
1167
|
+
elif not is_home_scope and host_name in {"claude", "codex", "cline", "trea", "funide", "qoder", "copilot"}:
|
|
1168
1168
|
write_host_mcp_config(root, host_name)
|
|
1169
1169
|
else:
|
|
1170
1170
|
return False
|