bugx-cli 0.1.0 → 0.1.2
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 +193 -185
- package/core/README.md +2 -2
- package/core/agent/README.md +2 -1
- package/core/agent/agent_artifacts.py +8 -6
- package/core/agent/agent_eval.py +136 -54
- package/core/agent/agent_execution.py +218 -52
- package/core/agent/agent_orchestrator.py +14 -8
- package/core/agent/agent_targets.py +8 -2
- package/core/agent/feature_baseline.py +150 -0
- package/core/assets/README.md +3 -2
- package/core/assets/axe-core/LICENSE-3RD-PARTY.txt +66 -0
- package/core/assets/axe-core/LICENSE.txt +362 -0
- package/core/assets/axe-core/UPSTREAM.md +10 -0
- package/core/assets/axe-core/axe.min.js +12 -0
- package/core/assets/bugx-hero-en.svg +74 -0
- package/core/assets/bugx-hero-zh.svg +74 -0
- package/core/assets/bugx-social-preview.svg +71 -0
- package/core/assets/bugx-wechat-group.png +0 -0
- package/core/assets/codex.png +0 -0
- package/core/assets/dsh.png +0 -0
- package/core/assets/webui-chatgpt.jpg +0 -0
- package/core/assets/webui-session.jpg +0 -0
- package/core/assets/webui-skills.jpg +0 -0
- package/core/assets/webui-studio.jpg +0 -0
- package/core/assets/webui-zcode.jpg +0 -0
- package/core/assets/zcode.png +0 -0
- package/core/audit_packs/README.md +2 -0
- package/core/audit_packs/pitfalls/auth_crypto.json +64 -0
- package/core/audit_packs/pitfalls/file_ssrf_cmd.json +64 -0
- package/core/audit_packs/pitfalls/go_backend.json +66 -0
- package/core/audit_packs/pitfalls/java_spring.json +64 -0
- package/core/audit_packs/pitfalls/js_ts_web.json +67 -0
- package/core/audit_packs/pitfalls/python_web.json +82 -0
- package/core/autonomous_cve/SPEC.md +1 -1
- package/core/autonomous_cve/attack_graph_store.py +152 -106
- package/core/autonomous_cve/behavior_graph.py +8 -2
- package/core/autonomous_cve/verifier.py +4 -1
- package/core/bugx.md +1 -1
- package/core/bugx_paths.py +43 -8
- package/core/cli-help.txt +66 -0
- package/core/cloud_sync/SPEC.md +1 -1
- package/core/cloud_sync/cloud_client.py +81 -11
- package/core/cloud_sync/cloud_onboard.py +42 -1
- package/core/cloud_sync/consent.py +33 -3
- package/core/cloud_sync/flywheel_client.py +186 -15
- package/core/cloud_sync/network_transport.py +24 -3
- package/core/cloud_sync/sensitive_filter.py +2 -2
- package/core/cloud_sync/sync_push.py +12 -10
- package/core/contracts/AGENT_GUIDE.md +6 -9
- package/core/contracts/README.md +2 -2
- package/core/contracts/bugx-runtime-contract.md +1 -1
- package/core/contracts/bugx-worker.md +1 -1
- package/core/contracts/engine_gap_contracts.py +86 -3
- package/core/coverage/coverage_discovery.py +599 -29
- package/core/coverage/coverage_evidence.py +47 -0
- package/core/coverage/coverage_forensics.py +9 -0
- package/core/coverage/coverage_validate.py +6 -1
- package/core/dev_harness/SPEC.md +1 -1
- package/core/engine-integrity.json +670 -442
- package/core/fuzzing/concurrency_fuzzer.py +53 -0
- package/core/fuzzing/differential_oracle.py +562 -27
- package/core/fuzzing/fuzz_input.py +109 -6
- package/core/fuzzing/stateful_fuzzer.py +72 -0
- package/core/governance/secret_redactor.py +22 -10
- package/core/host_acp/SPEC.md +1 -1
- package/core/host_acp/__init__.py +4 -4
- package/core/host_acp/claude.py +59 -1
- package/core/host_acp/cline.py +64 -1
- package/core/host_acp/codex.py +56 -1
- package/core/host_acp/dsh.py +59 -1
- package/core/host_acp/opencode.py +56 -1
- package/core/host_acp/pi.py +59 -1
- package/core/host_acp/zcode.py +59 -1
- package/core/host_runtime/SPEC.md +1 -1
- package/core/host_runtime/adapters.py +1 -1
- package/core/host_runtime/cline.py +13 -0
- package/core/host_runtime/host_evaluators.py +44 -4
- package/core/host_runtime/host_probe.py +1 -1
- package/core/host_runtime/host_provider_arbitrator.py +116 -62
- package/core/host_runtime/host_registry.py +15 -8
- package/core/host_runtime/mcp_registry_gate.py +12 -1
- package/core/host_runtime/pi.py +102 -0
- package/core/host_runtime/provider_facts.py +66 -0
- package/core/hosts/SPEC.md +1 -1
- package/core/hosts/__init__.py +6 -2
- package/core/hosts/_dsh_usage.py +1 -1
- package/core/hosts/base.py +32 -4
- package/core/hosts/claude.py +55 -0
- package/core/hosts/cline.py +6 -2
- package/core/hosts/codex.py +58 -0
- package/core/hosts/dsh.py +9 -1
- package/core/hosts/opencode.py +6 -6
- package/core/hosts/pi.py +159 -2
- package/core/infra/README.md +4 -2
- package/core/infra/__init__.py +2 -0
- package/core/infra/build_info.py +22 -3
- package/core/infra/client_metadata.py +1 -1
- package/core/infra/json_utils.py +22 -0
- package/core/launch_phases/README.md +6 -3
- package/core/launch_phases/SPEC.md +1 -1
- package/core/launch_phases/common.py +21 -2
- package/core/launch_phases/finding_confirm_phase.py +170 -5
- package/core/launch_phases/finding_settlement.py +188 -1
- package/core/launch_phases/judge_phase.py +69 -12
- package/core/launch_phases/orchestrator_controls.py +11 -7
- package/core/launch_phases/post_coverage_sync.py +9 -2
- package/core/launch_phases/post_phase.py +144 -8
- package/core/launch_phases/post_receipt.py +12 -1
- package/core/launch_phases/pre_phase.py +3 -3
- package/core/launch_phases/pre_recon_scout.py +66 -36
- package/core/launch_phases/pre_state_builder.py +23 -176
- package/core/launch_phases/report_sharing.py +3 -7
- package/core/launch_phases/round_orchestrator.py +129 -58
- package/core/launch_phases/semantic_recon.py +545 -0
- package/core/launch_phases/session_runtime.py +56 -9
- package/core/launch_phases/startup_gates.py +36 -8
- package/core/launch_phases/startup_interaction.py +68 -12
- package/core/launch_phases/startup_version_gate.py +13 -3
- package/core/launch_phases/supervisor_bridge.py +46 -17
- package/core/launch_phases/supervisor_coverage.py +8 -2
- package/core/launch_phases/supervisor_degraded.py +1 -9
- package/core/launch_phases/verify_loop.py +767 -0
- package/core/launch_phases/worker_barriers.py +15 -5
- package/core/launch_phases/worker_orchestrator.py +105 -25
- package/core/launch_phases/worker_prior.py +115 -0
- package/core/ledger/README.md +2 -1
- package/core/ledger/SPEC.md +1 -1
- package/core/ledger/_facade.py +2 -1
- package/core/ledger/archive_ops.py +60 -2
- package/core/ledger/cli.py +6 -1
- package/core/ledger/export_ops.py +6 -1
- package/core/ledger/finding_confirmation.py +48 -6
- package/core/ledger/finding_lifecycle.py +428 -5
- package/core/ledger/finding_verification.py +555 -10
- package/core/ledger/fp_ledger.py +255 -0
- package/core/ledger/incidents.py +10 -4
- package/core/ledger/patterns.py +10 -7
- package/core/ledger/receipt_contract.py +17 -1
- package/core/ledger/sync_ops.py +21 -16
- package/core/ledger/tool_experience.py +2 -1
- package/core/ledger/verify_life.py +88 -17
- package/core/locales/en-US.json +2 -2
- package/core/locales/zh-CN.json +2 -2
- package/core/mcp_handlers/SPEC.md +1 -1
- package/core/mcp_handlers/base.py +23 -3
- package/core/mcp_handlers/channel_lifecycle.py +85 -30
- package/core/mcp_handlers/retrieval_handlers.py +11 -1
- package/core/mcp_handlers/rpc_server.py +6 -1
- package/core/mcp_handlers/supervisor_handlers.py +32 -6
- package/core/mcp_handlers/tool_table.py +15 -0
- package/core/mcp_runtime_support/environment.py +0 -38
- package/core/mcp_runtime_support/verifier.py +0 -52
- package/core/metadata.txt +2 -3
- package/core/planning/README.md +2 -1
- package/core/planning/domain_router.py +4 -2
- package/core/planning/dynamic_flow_analyzer.py +219 -14
- package/core/planning/judge_pipeline.py +87 -4
- package/core/planning/prompt_harness.py +57 -15
- package/core/planning/prompt_policy_engine.py +386 -0
- package/core/planning/spec_harvester.py +4 -4
- package/core/probes/INTERFACE.md +11 -1
- package/core/probes/SPEC.md +11 -1
- package/core/probes/__init__.py +46 -40
- package/core/probes/android_probe.py +177 -9
- package/core/probes/codebase_memory_probe.py +57 -0
- package/core/probes/desktop_probe.py +104 -0
- package/core/probes/differential_probe.py +99 -21
- package/core/probes/efficiency_probe.py +64 -0
- package/core/probes/ios_binary_probe.py +105 -1
- package/core/probes/memory_probe.py +66 -0
- package/core/probes/miniprogram_probe.py +75 -13
- package/core/probes/mobile_probe.py +215 -30
- package/core/probes/native_probe.py +88 -0
- package/core/probes/openwiki_probe.py +70 -0
- package/core/probes/pattern_probe.py +106 -0
- package/core/probes/platform_probe.py +81 -0
- package/core/probes/probe_registry.py +108 -7
- package/core/probes/sast_fixture_corpus.py +340 -0
- package/core/probes/sast_probe.py +553 -52
- package/core/probes/sast_rules.py +668 -28
- package/core/probes/sca_scanner.py +48 -0
- package/core/probes/ui_accessibility.py +149 -0
- package/core/probes/ui_audit.py +513 -0
- package/core/probes/ui_contract.py +273 -0
- package/core/probes/ui_evidence.py +212 -0
- package/core/probes/ui_measurements.py +314 -0
- package/core/probes/ui_repair.py +250 -0
- package/core/probes/ui_review.py +133 -0
- package/core/probes/ui_storybook.py +107 -0
- package/core/probes/ui_tokens.py +185 -0
- package/core/probes/ui_visual_diff.py +131 -0
- package/core/probes/web_probe.py +373 -18
- package/core/project_profiler/SPEC.md +1 -1
- package/core/project_profiler/arbitrator.py +6 -1
- package/core/project_profiler/detector.py +8 -1
- package/core/project_profiler/strategy.py +51 -15
- package/core/prompts/README.md +4 -2
- package/core/prompts/command_routing_en.md +2 -2
- package/core/prompts/command_routing_zh.md +2 -2
- package/core/prompts/policies/prompt_policies.json +101 -0
- package/core/prompts/stages/stage_repair.md +1 -1
- package/core/prompts/stages/stage_verify.defensive.md +42 -0
- package/core/prompts/stages/stage_verify.md +44 -0
- package/core/repair/README.md +1 -1
- package/core/repair/l7_repair_loop.py +1 -4
- package/core/repair/rsi_fixer.py +4 -4
- package/core/repair/rsi_loop.py +1 -3
- package/core/repair/rsi_repair.py +7 -7
- package/core/repair/rsi_scope.py +27 -8
- package/core/report_engine/SPEC.md +1 -1
- package/core/report_engine/attestation.py +8 -4
- package/core/report_engine/finding_report.py +2 -1
- package/core/report_engine/models.py +7 -9
- package/core/report_engine/report_share.py +0 -8
- package/core/report_engine/sast_bridge.py +2 -2
- package/core/report_engine/server.py +18 -8
- package/core/report_engine/web-conformance.md +123 -18
- package/core/report_engine/web_conformance.py +21 -52
- package/core/retrieval/README.md +2 -1
- package/core/retrieval/SPEC.md +1 -1
- package/core/retrieval/code_analyzer.py +50 -14
- package/core/retrieval/context_assembler.py +7 -1
- package/core/retrieval/knowledge_sync.py +108 -14
- package/core/retrieval/pitfall_packs.py +277 -0
- package/core/retrieval/symbol_index.py +25 -6
- package/core/retrieval/universal_code_matcher.py +234 -49
- package/core/runtime/README.md +1 -1
- package/core/runtime/bugx_logging.py +78 -7
- package/core/runtime/fixture_solidify.py +5 -10
- package/core/runtime/global_telemetry.py +20 -0
- package/core/runtime/incident_eval.py +1 -1
- package/core/runtime/model_runner.py +4 -41
- package/core/runtime/platform_adapter.py +2 -2
- package/core/runtime/prep_validate.py +4 -2
- package/core/runtime/project_settings.py +2 -1
- package/core/runtime/scenario_eval.py +50 -8
- package/core/skills/bugx_docs_mcp_server.py +3 -1
- package/core/skills/bugx_mcp_server.py +29 -2
- package/core/skills/tools_kb.py +1 -1
- package/core/supervisor/README.md +1 -1
- package/core/supervisor/SPEC.md +1 -1
- package/core/supervisor/budget_governor.py +503 -9
- package/core/supervisor/checkpoint_pipeline.py +248 -6
- package/core/supervisor/checkpoint_sync.py +13 -0
- package/core/supervisor/claim_events.py +1 -1
- package/core/supervisor/finding_workflow.py +22 -5
- package/core/supervisor/lease_manager.py +1 -1
- package/core/supervisor/lifecycle_blocks.py +6 -1
- package/core/supervisor/rejection_remedies.py +52 -5
- package/core/supervisor/serial_authorization.py +48 -4
- package/core/supervisor/task_scheduler.py +2 -2
- package/core/supervisor/worker_checkpoint.py +8 -1
- package/core/supervisor/worker_runtime.py +8 -2
- package/core/supervisor_types/worker_claim.py +9 -0
- package/core/webui/README.md +1 -1
- package/core/webui/SPEC.md +2 -1
- package/core/webui/adapters/claude.py +5 -1
- package/core/webui/adapters/cline.py +10 -2
- package/core/webui/adapters/codex.py +5 -1
- package/core/webui/adapters/dsh.py +5 -1
- package/core/webui/docs_session_service.py +2 -2
- package/core/webui/mcp_inspector.py +11 -7
- package/core/webui/static/00-base.css +1060 -0
- package/core/webui/static/01-monitoring.css +802 -0
- package/core/webui/static/02-header-actions.css +321 -0
- package/core/webui/static/03-trigger-popover.css +697 -0
- package/core/webui/static/04-composer.css +628 -0
- package/core/webui/static/05-skills-center.css +878 -0
- package/core/webui/static/06-mcp-center.css +623 -0
- package/core/webui/static/07-skill-detail.css +265 -0
- package/core/webui/static/08-files-management.css +167 -0
- package/core/webui/static/09-files-center.css +386 -0
- package/core/webui/static/10-icons.css +105 -0
- package/core/webui/static/11-project-options.css +185 -0
- package/core/webui/static/12-profile-tab.css +383 -0
- package/core/webui/static/design-tokens.css +113 -0
- package/core/webui/static/index.html +14 -1
- package/core/webui/workspace_service.py +1 -1
- package/docs/07_distribution/01_README_NPM.md +193 -185
- package/ecosystem/integrations/README.md +1 -1
- package/ecosystem/integrations/dsh/mcp/package.json +1 -1
- package/ecosystem/integrations/dsh/skills/bugx-dsh/SKILL.md +1 -1
- package/ecosystem/integrations/dsh/ui/package.json +1 -1
- package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +4 -4
- package/ecosystem/integrations/opencode/mcp-lock.json +14 -6
- package/ecosystem/integrations/opencode/opencode.json +23 -12
- 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/ecosystem/plugins/bugx/skills/bugx-dsh/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/skills/bugx-opencode/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +1 -1
- package/interfaces/bin/bugx.js +37 -0
- package/interfaces/cli/bugx_cli/__init__.py +4 -2
- package/interfaces/cli/bugx_cli/cli.py +172 -69
- package/interfaces/cli/bugx_cli/commands/advisory.py +1 -1
- package/interfaces/cli/bugx_cli/commands/agent.py +461 -134
- package/interfaces/cli/bugx_cli/commands/audit.py +10 -9
- package/interfaces/cli/bugx_cli/commands/autonomous.py +1 -1
- package/interfaces/cli/bugx_cli/commands/cloud.py +31 -22
- package/interfaces/cli/bugx_cli/commands/doctor.py +449 -204
- package/interfaces/cli/bugx_cli/commands/interaction.py +5 -1
- package/interfaces/cli/bugx_cli/commands/knowledge.py +5 -4
- package/interfaces/cli/bugx_cli/commands/lifecycle.py +3 -3
- package/interfaces/cli/bugx_cli/commands/plugin.py +58 -23
- package/interfaces/cli/bugx_cli/commands/plugin_claude.py +7 -7
- package/interfaces/cli/bugx_cli/commands/plugin_funide.py +2 -1
- package/interfaces/cli/bugx_cli/commands/plugin_zcode.py +1 -1
- package/interfaces/cli/bugx_cli/commands/project.py +6 -13
- package/interfaces/cli/bugx_cli/commands/report.py +2 -6
- package/interfaces/cli/bugx_cli/commands/system.py +524 -169
- package/interfaces/cli/bugx_cli/common.py +21 -15
- package/interfaces/cli/bugx_cli/host_adapters.py +29 -54
- package/interfaces/cli/bugx_cli/hosts/registry.py +8 -6
- package/interfaces/cli/bugx_cli/infra/ai_advisor.py +157 -27
- package/interfaces/cli/bugx_cli/infra/engine_installer.py +35 -16
- package/interfaces/cli/bugx_cli/infra/host_sync.py +11 -8
- package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +76 -5
- package/interfaces/cli/bugx_cli/infra/security.py +13 -6
- package/package.json +30 -15
- package/pyproject.toml +60 -9
- package/scripts/ensure-python.mjs +7 -7
- package/scripts/sync-version.mjs +10 -21
- package/scripts/test-npm-wrapper.mjs +1 -1
- package/core/assets/bugx-hero-cn.png +0 -0
- package/core/assets/bugx-hero-en.png +0 -0
- package/core/webui/static/project-settings.css +0 -6458
- package/docs/07_distribution/README.md +0 -16
- package/docs/README.md +0 -121
- package/interfaces/README.md +0 -143
- package/interfaces/bin/README.md +0 -35
- package/interfaces/cli/README.md +0 -90
- package/scripts/README.md +0 -118
package/README.md
CHANGED
|
@@ -1,281 +1,289 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/bugx-hero-en.svg" alt="BugX — effortless audits of AI-written code" width="1000">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# BugX — AI Code Audit & Code Review Agent for Claude Code, Codex, Cline, OpenCode, and ZCode
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<em>AI writes the code. BugX hunts the bugs. · 面向主流 AI 编程助手的自主闭环、证据驱动型深度代码审计智能体。</em>
|
|
11
|
-
</p>
|
|
7
|
+
BugX is an autonomous code-audit and automated code review agent that runs inside your AI coding assistant or on the command line. It audits AI-written code end to end: it builds a coverage list of your project, dispatches concurrent audit workers, verifies every candidate finding with real executions, and produces an actionable report where each finding ships with a command you can run yourself to reproduce it.
|
|
8
|
+
|
|
9
|
+
If you use AI coding tools to write production code, BugX is the automated code review and security audit agent that checks what the model actually delivered — not what it claims to have delivered.
|
|
12
10
|
|
|
13
11
|
<p align="center">
|
|
14
|
-
<a href="https://www.npmjs.com/package
|
|
15
|
-
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-334155.svg?style=flat
|
|
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" alt="npm version"></a>
|
|
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>
|
|
16
14
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-BSL--1.1-334155.svg?style=flat" alt="License: BSL-1.1"></a>
|
|
17
|
-
<
|
|
18
|
-
<a href="https://www.npmjs.com/package/@bencibro/bugx"><img src="https://img.shields.io/badge/security-AST--Redacted%20%26%20Local--First-334155.svg?style=flat" alt="Security"></a>
|
|
15
|
+
<img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-334155.svg?style=flat" alt="Platform">
|
|
19
16
|
</p>
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
🌐 Website · 官网:**https://bugx.dev**
|
|
22
19
|
|
|
23
20
|
<p align="center">
|
|
24
|
-
<a href="#-english-documentation">English
|
|
25
|
-
<a href="
|
|
21
|
+
<a href="#-english-documentation">English</a> •
|
|
22
|
+
<a href="#简体中文说明">简体中文</a>
|
|
26
23
|
</p>
|
|
27
24
|
|
|
28
25
|
---
|
|
29
26
|
|
|
30
|
-
##
|
|
27
|
+
## English Documentation
|
|
31
28
|
|
|
32
|
-
###
|
|
29
|
+
### Why AI-written code needs an audit
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
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:
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
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.
|
|
34
|
+
2. **Checking is expensive; claiming is cheap.** Reading hundreds of files takes real work. Replying "no issues found" takes a few words.
|
|
35
|
+
3. **It doesn't know what it hasn't checked.** The model cannot see its own coverage gaps and will not say "half done."
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
flowchart LR
|
|
40
|
-
A[Source Code] --> B[AST & Route Discovery]
|
|
41
|
-
B --> C[Mutation & Race Fuzzing]
|
|
42
|
-
C --> D[Executable PoC Script]
|
|
43
|
-
D --> E[TDD Red-to-Green Patch]
|
|
44
|
-
```
|
|
37
|
+
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.
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
- **Red-Green Patch Synthesis**: BugX automatically synthesizes minimal fixes and verifies them with dual test runs before closing findings.
|
|
48
|
-
- **Host-Neutral Architecture**: BugX never hijacks LLM execution. Your AI coding agent drives the actual code analysis and testing natively.
|
|
39
|
+
### What BugX does
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
- **AI code review** — bugs and defects classified by logic, state, boundary, exception, concurrency, performance, and resource handling.
|
|
42
|
+
- **Functionality review** — a behavior diff: the same inputs go to your implementation and a reference implementation, and the differences are reported.
|
|
43
|
+
- **Performance and memory checks** — performance and resource defects, plus dedicated memory inspection for native, Python, JVM, Electron, Android, and Apple targets.
|
|
44
|
+
- **UI audit** — layout, contrast, keyboard paths, and design tokens on a running web page (`bugx probe ui`).
|
|
45
|
+
- **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.
|
|
46
|
+
- **Prompt Policy Engine** — declarative prompt profiles adapt to model-specific safety filters (e.g. OpenAI Cyber Risk / Daybreak) without losing code fidelity.
|
|
47
|
+
- **Mutation-verified tests** — `bugx test-verify` mutates your code to check whether the tests actually catch the bugs.
|
|
48
|
+
- **Patch bundles** — `bugx patch-forge` builds a patch with static checks and hands it to you for review; it never commits on its own.
|
|
49
|
+
- **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.
|
|
51
50
|
|
|
52
|
-
###
|
|
51
|
+
### BugX Studio
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
- **Node.js**: `>= 18.0.0`
|
|
56
|
-
- **Python**: `>= 3.11` (The BugX core engine is Python-powered; the npm package serves as a lightweight, zero-dependency global wrapper that automatically interfaces with your local Python environment).
|
|
53
|
+
BugX ships with a built-in web console. Run `bugx report serve` and open http://127.0.0.1:8080:
|
|
57
54
|
|
|
58
|
-
|
|
55
|
+
<p align="center">
|
|
56
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-studio.jpg" alt="BugX Studio workbench" width="860">
|
|
57
|
+
</p>
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
Every connected host keeps its own audit sessions (ChatGPT, ZCode, Claude, Codex, DSH, OpenCode, Pi, and more):
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
<p align="center">
|
|
62
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-chatgpt.jpg" alt="ChatGPT workspace" width="420">
|
|
63
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-zcode.jpg" alt="ZCode workspace" width="420">
|
|
64
|
+
</p>
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
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):
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
<p align="center">
|
|
69
|
+
<img src="https://raw.githubusercontent.com/Bencibr/bugx/main/core/assets/webui-skills.jpg" alt="Skill marketplace" width="860">
|
|
70
|
+
</p>
|
|
71
|
+
|
|
72
|
+
### Quick start
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
npx @bencibro/bugx init
|
|
74
|
+
Requires Node.js `>=18`. Python `>=3.11` is detected and managed by the wrapper.
|
|
72
75
|
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
**Run without installing (zero-config):**
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx bugx-cli doctor --strict # check system readiness and AI tool connectivity
|
|
80
|
+
npx bugx-cli init # initialize the current repository (.bugx/)
|
|
81
|
+
npx bugx-cli install # register local AI assistants
|
|
75
82
|
```
|
|
76
83
|
|
|
77
|
-
|
|
84
|
+
**Or install globally** (pick your package manager):
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g bugx-cli
|
|
88
|
+
# pnpm add -g bugx-cli
|
|
89
|
+
# yarn global add bugx-cli
|
|
90
|
+
# bun add -g bugx-cli
|
|
91
|
+
```
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
After installing, run this once from any directory:
|
|
82
94
|
|
|
83
95
|
```bash
|
|
84
|
-
#
|
|
85
|
-
|
|
96
|
+
bugx install # lists detected AI hosts and registers the BugX MCP servers
|
|
97
|
+
bugx doctor --strict # health diagnostics
|
|
98
|
+
```
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
pnpm add -g @bencibro/bugx
|
|
100
|
+
To install everywhere at once: `bugx install --agent all`.
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
yarn global add @bencibro/bugx
|
|
102
|
+
**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:
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
**ZCode**
|
|
105
|
+

|
|
106
|
+
|
|
107
|
+
**Codex**
|
|
108
|
+

|
|
96
109
|
|
|
97
|
-
|
|
110
|
+
**DSH**
|
|
111
|
+

|
|
112
|
+
|
|
113
|
+
> "Audit this project"
|
|
114
|
+
> "Check the login module for vulnerabilities"
|
|
115
|
+
> "Review the changes on this branch for security issues"
|
|
116
|
+
|
|
117
|
+
**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.
|
|
98
118
|
|
|
99
119
|
```bash
|
|
100
|
-
#
|
|
101
|
-
bugx init
|
|
120
|
+
bugx auth login # sign in to the cloud account (lesson and experience sync)
|
|
121
|
+
bugx init --cloud-sync sync # enable cloud sync so the project works across devices
|
|
122
|
+
|
|
123
|
+
bugx engine pre # build the coverage list and audit plan
|
|
124
|
+
bugx engine status # follow progress
|
|
125
|
+
bugx engine post # settle: cross-check coverage, evidence, and verdicts
|
|
102
126
|
|
|
103
|
-
|
|
104
|
-
bugx
|
|
127
|
+
bugx autonomous --host opencode # full audit without supervision
|
|
128
|
+
bugx goal --host opencode "audit this project's login and payment flows"
|
|
105
129
|
|
|
106
|
-
#
|
|
107
|
-
bugx
|
|
130
|
+
bugx report serve # live web console at http://127.0.0.1:8080
|
|
131
|
+
bugx report both --format html --out report.html # offline archive
|
|
108
132
|
```
|
|
109
133
|
|
|
110
|
-
|
|
134
|
+
### Essential commands
|
|
111
135
|
|
|
112
|
-
|
|
136
|
+
| Command | What it does |
|
|
137
|
+
| :--- | :--- |
|
|
138
|
+
| `bugx install` | register the BugX MCP servers with detected AI hosts |
|
|
139
|
+
| `bugx hosts` | list every AI environment detected on this machine |
|
|
140
|
+
| `bugx doctor --strict` | health diagnostics for installation and connectivity |
|
|
141
|
+
| `bugx engine pre / status / post` | run and settle a structured audit lifecycle |
|
|
142
|
+
| `bugx autonomous --host <host>` | full unattended audit through your host |
|
|
143
|
+
| `bugx goal --host <host> "<target>"` | audit toward a stated target |
|
|
144
|
+
| `bugx report serve` | live web console (BugX Studio) |
|
|
145
|
+
| `bugx report both --format html` | export the formal + visual report |
|
|
146
|
+
| `bugx probe ui --url <url>` | audit a running web UI |
|
|
147
|
+
| `bugx test-generate` | generate AAA tests or a self-contained PoC |
|
|
148
|
+
| `bugx test-verify` | prove your tests catch real bugs via mutation |
|
|
149
|
+
| `bugx patch-forge` | build a reviewed patch bundle |
|
|
150
|
+
| `bugx lesson` / `bugx knowledge` | project and global experience base |
|
|
151
|
+
| `bugx daemon` | resident watchdog for unattended audits |
|
|
152
|
+
|
|
153
|
+
### Supported AI coding tools
|
|
154
|
+
|
|
155
|
+
| AI coding tool | Integration | Install |
|
|
156
|
+
| :--- | :--- | :--- |
|
|
157
|
+
| Claude Code | native MCP / autonomous lifecycle | `bugx install --agent claude` |
|
|
158
|
+
| OpenAI Codex | workspace subagents / native plugin | `bugx install --agent codex` |
|
|
159
|
+
| OpenCode | headless ACP / native MCP | `bugx install --agent opencode` |
|
|
160
|
+
| Cline / Roo Code | MCP sessions (serial) / CLI process-pool concurrency | `bugx install --agent cline` |
|
|
161
|
+
| ZCode | native MCP / user-level MCP registration | `bugx install --agent zcode` |
|
|
113
162
|
|
|
114
|
-
|
|
163
|
+
DeepSeek Harness (DSH), WorkBuddy, Cursor / Windsurf, and more are being adapted. Run `bugx hosts` to list everything detected on this machine.
|
|
115
164
|
|
|
116
|
-
|
|
117
|
-
| :--- | :--- | :--- |
|
|
118
|
-
| **Claude Code** | Native MCP / Autonomous Protocol | `bugx install --agent claude` |
|
|
119
|
-
| **OpenAI Codex** | Workspace Subagent / Native Plugin | `bugx install --agent codex` |
|
|
120
|
-
| **OpenCode** | Headless ACP / Native MCP | `bugx install --agent opencode` |
|
|
121
|
-
| **DeepSeek Harness (DSH)** | Official Web UI Extension & MCP | `bugx install --agent dsh` |
|
|
122
|
-
| **WorkBuddy** | Official IDE Connector Bundle | `bugx install --agent workbuddy` |
|
|
123
|
-
| **Cline / Roo Code** | MCP; interactive single-claim or CLI process-pool execution | `bugx install --agent cline` |
|
|
124
|
-
| **ChatGPT** | Project MCP / interactive host integration | `bugx install --agent chatgpt` |
|
|
125
|
-
| **ZCode** | Native MCP / host integration | `bugx install --agent zcode` |
|
|
126
|
-
| **Pi** | Native MCP / host integration | `bugx install --agent pi` |
|
|
127
|
-
| **Qoder AI** | Native MCP / host integration | `bugx install --agent qoder` |
|
|
128
|
-
| **Trea** | Native MCP / host integration | `bugx install --agent trea` |
|
|
129
|
-
| **FunIDE** | Native MCP / host integration | `bugx install --agent funide` |
|
|
130
|
-
| **Cursor / Windsurf** | Standard MCP Server | `bugx mcp serve --role host` |
|
|
131
|
-
|
|
132
|
-
Run `bugx hosts` to see all supported and detected environments on your system.
|
|
165
|
+
### Security and privacy
|
|
133
166
|
|
|
134
|
-
|
|
167
|
+
- Project state lives in the project's `.bugx/` directory; the global engine, credentials, knowledge base, and caches live in a user-level BugX directory.
|
|
168
|
+
- 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.
|
|
169
|
+
- Cloud uploads, feedback, diagnostic log reporting, and sync are all explicit operations: each states its `--scope` before it runs.
|
|
170
|
+
- `reset` / `uninstall` / `purge` / `--no-backup` delete data. Check each command's dry-run and backup behavior first.
|
|
135
171
|
|
|
136
|
-
###
|
|
172
|
+
### FAQ
|
|
137
173
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
| `bugx init` | Initialize repository audit workspace and configuration (`.bugx/`) |
|
|
141
|
-
| `bugx install` | Automatically register BugX with local AI assistants and editors |
|
|
142
|
-
| `bugx doctor` | Diagnostic suite for MCP servers, environment binaries, and project configuration |
|
|
143
|
-
| `bugx autonomous` | Run unattended, multi-round autonomous audit sessions; Cline supports `--workers 2..6` (or `0` for adaptive capacity) |
|
|
144
|
-
| `bugx stats` | Global cross-project governance, token economy, and audit velocity metrics |
|
|
145
|
-
| `bugx test-generate` | Generate standardized AAA unit tests or minimal reproduction PoCs |
|
|
146
|
-
| `bugx test-audit` | Four-dimensional quality audit for existing test suites |
|
|
147
|
-
| `bugx test-verify` | Verify test suite defect-catching effectiveness via AST mutation |
|
|
148
|
-
| `bugx patch-forge` | Synthesize minimal self-healing patches and run red-green verification |
|
|
149
|
-
| `bugx uninstall` | Cleanly remove host integrations while safely retaining audit findings |
|
|
150
|
-
| `bugx update` | Check and upgrade BugX to the latest release |
|
|
151
|
-
|
|
152
|
-
Autonomous sessions keep their host, execution mode, worker capacity, and dispatch settings in the current project’s `.bugx/bugx-runtime.json`. Each workspace has its own runtime context, so concurrent hosts do not share global scheduling state. Use `bugx autonomous --host cline --workers 4` to select an explicit Cline process-pool capacity; `0` keeps adaptive capacity.
|
|
174
|
+
**What is BugX?**
|
|
175
|
+
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.
|
|
153
176
|
|
|
154
|
-
|
|
177
|
+
**How does BugX verify a vulnerability?**
|
|
178
|
+
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.
|
|
155
179
|
|
|
156
|
-
|
|
180
|
+
**Does BugX trigger AI model cyber-security risk blocks?**
|
|
181
|
+
BugX includes a declarative Prompt Policy Engine with adaptive prompt profiles (e.g., defensive QA phrasing for OpenAI Codex / GPT-4o) that prevents models from triggering platform Daybreak / Cyber Risk safety blocks, while preserving 100% of the underlying code and CWE details.
|
|
157
182
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- **Deterministic Bounds**: Concurrency budgets, timeout thresholds, and execution sandboxes ensure your host system remains stable.
|
|
183
|
+
**Does BugX send my code to the cloud?**
|
|
184
|
+
The audit itself runs locally. Cloud sync of lessons and experience is an explicit opt-in; nothing is uploaded unless you run it.
|
|
161
185
|
|
|
162
|
-
|
|
186
|
+
**Does BugX replace human review?**
|
|
187
|
+
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.
|
|
163
188
|
|
|
164
|
-
|
|
189
|
+
**What languages does BugX audit?**
|
|
190
|
+
Multi-language static and behavioral analysis (Python, JavaScript/TypeScript, Java, Go, Rust, and more via tree-sitter), plus dedicated memory checks for native, Python, JVM, Electron, Android, and Apple targets.
|
|
165
191
|
|
|
166
|
-
###
|
|
192
|
+
### Keywords
|
|
167
193
|
|
|
168
|
-
|
|
194
|
+
vibe coding · vibe coding security · pr review · pull request review · zero false positive · poc generator · mcp security · automated code audit · ai code audit · automated code review · code review agent · ai agent · security audit · vulnerability scanner · vulnerability mining · sast · static analysis · mcp server · claude code · openai codex · opencode · cline · roo code · zcode · coding agent · llm code review · autonomous audit · behavior diff · memory leak detection · python security · javascript security · devsecops
|
|
169
195
|
|
|
170
|
-
|
|
196
|
+
---
|
|
171
197
|
|
|
172
|
-
|
|
173
|
-
flowchart LR
|
|
174
|
-
A[项目源码] --> B[白盒 AST 与接口遍历]
|
|
175
|
-
B --> C[变异测试与并发竞态扰动]
|
|
176
|
-
C --> D[自包含独立可执行 PoC]
|
|
177
|
-
D --> E[TDD 红绿双跑最小安全补丁]
|
|
178
|
-
```
|
|
198
|
+
## 简体中文说明
|
|
179
199
|
|
|
180
|
-
|
|
181
|
-
- **红绿测试自愈合成**:通过本地隔离沙箱执行 Red-to-Green 差异双跑,在确认补丁精准修复且不引入任何回归前,绝不虚假结案;
|
|
182
|
-
- **宿主无关,零侵入性**:不争夺模型执行权,代码阅读、测试执行与修复方案全部由开发者信任的 AI 宿主原生驱动。
|
|
200
|
+
### 什么是 BugX?
|
|
183
201
|
|
|
184
|
-
|
|
202
|
+
BugX 是装进 AI 编程助手的**自动代码审计与自动化 Code Review 智能体(Agent)**。它对 AI 写出的代码做端到端自动化审计与代码审查:把项目拆成覆盖清单、派发并发审计 Worker、对每条候选漏洞做真实执行验证,最终产出一份详实的审计报告——每条漏洞都附带一条你可以亲手运行的复现命令。
|
|
185
203
|
|
|
186
|
-
|
|
204
|
+
如果你的生产代码来自 AI 编程工具,BugX 就是那个专注于**自动代码审计**、**Code Review** 与安全加固的智能体层:它核查模型**实际交付了什么**,而不是模型**声称交付了什么**。
|
|
187
205
|
|
|
188
|
-
|
|
189
|
-
- **Node.js**:`>= 18.0.0`
|
|
190
|
-
- **Python**:`>= 3.11`(BugX 底层核心引擎由 Python 驱动,npm 包作为轻量 CLI 封装,启动时会自动无缝对接本机 Python 环境)
|
|
206
|
+
### 为什么 AI 代码需要审计
|
|
191
207
|
|
|
192
|
-
|
|
208
|
+
AI 写代码的速度远超人工审查,而且模型带着训练层面的偏差——听起来做完了,比真的做完了更容易:
|
|
193
209
|
|
|
194
|
-
|
|
210
|
+
1. **评分机制奖励自信。** 人类评分员给「我仔细查过了,没发现问题」的分数高于「文件我还没看完」。模型学会的是报喜。
|
|
211
|
+
2. **检查贵,声称便宜。** 读几百个文件是体力活,回一句「没发现问题」只要几个字。
|
|
212
|
+
3. **它不知道自己没查完。** 模型看不见自己的覆盖盲区,也不会说「做了一半」。
|
|
195
213
|
|
|
196
|
-
|
|
214
|
+
BugX 用一本账和四条硬规矩对抗这件事:逐单元覆盖清单(查完 / 卡住 / 未查)、强制复现(同一段攻击输入触发两次、正常输入触发零次)、审计可断点续跑、哈希链记录让每条结论都可复查。
|
|
197
215
|
|
|
198
|
-
|
|
216
|
+
### 快速上手
|
|
199
217
|
|
|
200
|
-
|
|
201
|
-
# 检查系统与 AI 工具连通就绪状态
|
|
202
|
-
npx @bencibro/bugx doctor
|
|
218
|
+
要求 Node.js `>=18`;Python `>=3.11` 由包装器自动检测管理。
|
|
203
219
|
|
|
204
|
-
|
|
205
|
-
npx @bencibro/bugx init
|
|
220
|
+
**免安装直接执行:**
|
|
206
221
|
|
|
207
|
-
|
|
208
|
-
npx
|
|
222
|
+
```bash
|
|
223
|
+
npx bugx-cli doctor --strict # 检查系统就绪与 AI 工具连通
|
|
224
|
+
npx bugx-cli init # 初始化当前仓库(.bugx/)
|
|
225
|
+
npx bugx-cli install # 注册本地 AI 助手
|
|
209
226
|
```
|
|
210
227
|
|
|
211
|
-
|
|
228
|
+
**或全局安装:**
|
|
212
229
|
|
|
213
|
-
|
|
230
|
+
```bash
|
|
231
|
+
npm install -g bugx-cli
|
|
232
|
+
```
|
|
214
233
|
|
|
215
|
-
|
|
234
|
+
装好后任意目录跑一次:
|
|
216
235
|
|
|
217
236
|
```bash
|
|
218
|
-
#
|
|
219
|
-
|
|
237
|
+
bugx install # 列出检测到的 AI 宿主并注册 BugX MCP 服务
|
|
238
|
+
bugx doctor --strict # 健康自检
|
|
239
|
+
```
|
|
220
240
|
|
|
221
|
-
|
|
222
|
-
pnpm add -g @bencibro/bugx
|
|
241
|
+
一次装全所有宿主:`bugx install --agent all`。
|
|
223
242
|
|
|
224
|
-
|
|
225
|
-
yarn global add @bencibro/bugx
|
|
243
|
+
**方式一:在 AI 助手里用(推荐)。** 在任意项目里打开 Claude Code、Codex、Cline、OpenCode 或 ZCode,直接说:
|
|
226
244
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
245
|
+
> 「审计一下这个项目」
|
|
246
|
+
> 「查一下登录模块有没有漏洞」
|
|
247
|
+
|
|
248
|
+
宿主里的 AI 会自动调用 BugX:建覆盖清单、派发并发 Worker、跑探针、验证漏洞、出报告。想实时看,终端跑 `bugx report serve`,浏览器打开 http://127.0.0.1:8080。
|
|
230
249
|
|
|
231
|
-
|
|
250
|
+
**方式二:命令行直接跑。** AI 同样来自你已装好的宿主——模型和凭据直接复用,不接管你的 Key。
|
|
232
251
|
|
|
233
252
|
```bash
|
|
234
|
-
#
|
|
235
|
-
bugx init
|
|
253
|
+
bugx auth login # 登录云端账号(错题/经验同步用)
|
|
254
|
+
bugx init --cloud-sync sync # 开启云端同步
|
|
236
255
|
|
|
237
|
-
|
|
238
|
-
bugx
|
|
256
|
+
bugx engine pre # 建立覆盖清单与审计计划
|
|
257
|
+
bugx engine status # 看进度
|
|
258
|
+
bugx engine post # 结账:核对覆盖、证据与裁决
|
|
239
259
|
|
|
240
|
-
#
|
|
241
|
-
bugx
|
|
260
|
+
bugx autonomous --host opencode # 无人值守完整审计
|
|
261
|
+
bugx report serve # 实时 Web 报告 http://127.0.0.1:8080
|
|
242
262
|
```
|
|
243
263
|
|
|
244
|
-
|
|
245
|
-
> *“使用 BugX 对本项目的 API 边界与数据持久化逻辑进行深度审计。”*
|
|
264
|
+
### 支持的 AI 编程宿主
|
|
246
265
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
### 🤖 支持的 AI 编程宿主
|
|
250
|
-
|
|
251
|
-
| AI 编程助手 | 接入机制 | 快速安装命令 |
|
|
266
|
+
| AI 编程助手 | 接入方式 | 安装命令 |
|
|
252
267
|
| :--- | :--- | :--- |
|
|
253
|
-
|
|
|
254
|
-
|
|
|
255
|
-
|
|
|
256
|
-
|
|
|
257
|
-
|
|
|
258
|
-
| **Cline / Roo Code** | 插件 MCP 交互会话(单 Claim 串行)/ CLI 多进程池自治并发 | `bugx install --agent cline` |
|
|
259
|
-
| **ChatGPT** | 项目级 MCP / 交互式宿主接入 | `bugx install --agent chatgpt` |
|
|
260
|
-
| **ZCode** | 原生 MCP / 宿主接入 | `bugx install --agent zcode` |
|
|
261
|
-
| **Pi** | 原生 MCP / 宿主接入 | `bugx install --agent pi` |
|
|
262
|
-
| **Qoder AI** | 原生 MCP / 宿主接入 | `bugx install --agent qoder` |
|
|
263
|
-
| **Trea** | 原生 MCP / 宿主接入 | `bugx install --agent trea` |
|
|
264
|
-
| **FunIDE** | 原生 MCP / 宿主接入 | `bugx install --agent funide` |
|
|
265
|
-
| **Cursor / Windsurf** | 通用 MCP 服务协议 | `bugx mcp serve --role host` |
|
|
266
|
-
|
|
267
|
-
运行 `bugx hosts` 可实时查看当前设备上支持与检测到的 AI 工具清单。
|
|
268
|
+
| Claude Code | 原生 MCP / 自治生命周期 | `bugx install --agent claude` |
|
|
269
|
+
| OpenAI Codex | 工作区子 Agent / 原生插件 | `bugx install --agent codex` |
|
|
270
|
+
| OpenCode | Headless ACP / 原生 MCP | `bugx install --agent opencode` |
|
|
271
|
+
| Cline / Roo Code | MCP 会话(串行)/ CLI 多进程池并发 | `bugx install --agent cline` |
|
|
272
|
+
| ZCode | 原生 MCP / 用户级注册 | `bugx install --agent zcode` |
|
|
268
273
|
|
|
269
|
-
|
|
274
|
+
DeepSeek Harness(DSH)、WorkBuddy、Cursor / Windsurf 等持续适配中。运行 `bugx hosts` 查看本机检测到的宿主。
|
|
270
275
|
|
|
271
|
-
###
|
|
276
|
+
### 安全与隐私
|
|
272
277
|
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
278
|
+
- 项目状态存放在项目内 `.bugx/` 目录;全局引擎、凭据、知识库与缓存在用户级 BugX 目录。
|
|
279
|
+
- 凭据按需写入受控沙箱(默认仅当前用户可读);`bugx auth status` 只报告是否存在,不输出内容。
|
|
280
|
+
- 云端上传、反馈、诊断上报与同步都是显式操作,执行前明确 `--scope`。
|
|
281
|
+
- `reset` / `uninstall` / `purge` / `--no-backup` 会删除数据,注意各自的 dry-run 与备份行为。
|
|
276
282
|
|
|
277
|
-
|
|
283
|
+
### 关键词
|
|
284
|
+
|
|
285
|
+
自动代码审计 · AI 代码审计 · 自动化 Code Review · Code Review · 代码审查 Agent · 代码审计智能体 · AI Agent · Vibe Coding 安全 · 氛围编程审计 · PR 自动审查 · 零误报 · 真实 PoC 复现 · 盲审验证 · 安全审计 · 漏洞扫描 · 漏洞挖掘 · 静态分析 · MCP 服务 · MCP 安全 · Claude Code 审计 · Codex 审计 · 编程助手安全 · 自主审计 · 行为差分 · 内存泄漏检测 · Python 安全 · JavaScript 安全 · DevSecOps
|
|
278
286
|
|
|
279
|
-
|
|
287
|
+
## License
|
|
280
288
|
|
|
281
|
-
|
|
289
|
+
[Business Source License 1.1](https://github.com/Bencibr/bugx/blob/main/LICENSE)
|
package/core/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# BugX 微内核与核心领域系统 (Core Microkernel & Domain Architecture)
|
|
2
2
|
|
|
3
|
-
> **版本契约**: `1.
|
|
3
|
+
> **版本契约**: `0.1.2` | **调度微内核**: `core/launch_bugx.py` + `core/supervisor/`
|
|
4
4
|
> **工程规范**: 参见 [`docs/02_architecture/05_ARCH_NOMENCLATURE_GUIDE.md`](../docs/02_architecture/05_ARCH_NOMENCLATURE_GUIDE.md) 与 [`docs/02_architecture/06_MODULE_GOVERNANCE_SPEC.md`](../docs/02_architecture/06_MODULE_GOVERNANCE_SPEC.md)
|
|
5
|
-
> **守卫机制**: `scripts/verify_directory_indices.py`
|
|
5
|
+
> **守卫机制**: `scripts/verify_directory_indices.py` (100% 索引对齐防漂移)
|
|
6
6
|
|
|
7
7
|
本文档为 BugX `core/` 目录的唯一权威架构全景与物理文件索引字典。记录了微内核分层架构、34 个专业领域子系统、核心底层资产及全部物理文件索引。
|
|
8
8
|
|
package/core/agent/README.md
CHANGED
|
@@ -20,7 +20,7 @@ flowchart TD
|
|
|
20
20
|
|
|
21
21
|
subgraph ArtifactsEvaluation["3. 产物封签与效果评估"]
|
|
22
22
|
AA["agent_artifacts.py<br/>中间补丁、测试日志与产物规范哈希封签"]
|
|
23
|
-
AE["agent_eval.py<br
|
|
23
|
+
AE["agent_eval.py<br/>行为指标度量、基线门槛对比与质量打分<br/>feature_baseline.py(功能完备性基准评测)"]
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
Orchestration --> WorkspaceExecution
|
|
@@ -36,6 +36,7 @@ flowchart TD
|
|
|
36
36
|
| `__init__.py` | 智能体领域子包入口与核心符号导出 | `AgentOrchestrator`, `AgentWorkspace`, `AgentArtifact` |
|
|
37
37
|
| `agent_artifacts.py` | 统一管理 Worker 生成的中间补丁、测试日志与证据文件规范与哈希封签 | `AgentArtifact`, `BugCandidate`, `ReproCase`, `PatchCandidate`, `seal_artifact` |
|
|
38
38
|
| `agent_eval.py` | 对 Agent 执行输出进行一致性度量与质量评估打分 | `score`, `validate_cases`, `validate_findings`, `metrics_record` |
|
|
39
|
+
| `feature_baseline.py` | 功能完备性基准评测(F-022):声明被审产品功能清单与植入缺失,`completeness_recall/precision/by_domain` 三指标计入 quality_score(权重 0.25)。管线接线:baseline 可经 `--feature-baseline` 或**评测集内嵌**(cases payload `feature_baseline` 键,flag 优先)启用;`_print_score` 输出 `完备性召回/完备性精确/植入缺失检出` 行供 scenario_eval L4 解析 | `validate_feature_baseline`, `completeness_metrics`, `FeatureBaselineError` |
|
|
39
40
|
| `agent_execution.py` | Agent 执行管道,驱动任务状态机并在超时时安全回收子进程组 | `execute_check_plan`, `CheckPlan`, `ExecutionObservation` |
|
|
40
41
|
| `agent_orchestrator.py` | 多 Agent 协作调度微内核,负责任务拆解、拓扑依赖与工作分配 | `AgentOrchestrator`, `assemble_task_prompt` |
|
|
41
42
|
| `agent_targets.py` | 被测代码库攻击面切片与多 Worker 并发分配算法 | `adapt_project`, `adapt_python_project`, `adapt_node_project` |
|
|
@@ -13,6 +13,8 @@ from functools import lru_cache
|
|
|
13
13
|
from pathlib import Path, PureWindowsPath
|
|
14
14
|
from typing import Any, Mapping, TypeAlias
|
|
15
15
|
|
|
16
|
+
from core.infra.json_utils import unique_json_object
|
|
17
|
+
|
|
16
18
|
try:
|
|
17
19
|
from jsonschema import Draft202012Validator, FormatChecker
|
|
18
20
|
except ImportError: # strict validation fails closed when the validator is unavailable
|
|
@@ -356,12 +358,12 @@ def _finite_float(value: str) -> float:
|
|
|
356
358
|
|
|
357
359
|
|
|
358
360
|
def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
361
|
+
return unique_json_object(
|
|
362
|
+
pairs,
|
|
363
|
+
error_factory=lambda key: ArtifactValidationError(
|
|
364
|
+
f"duplicate JSON object key: {key}"
|
|
365
|
+
),
|
|
366
|
+
)
|
|
365
367
|
|
|
366
368
|
|
|
367
369
|
def parse_json(data: str | bytes | bytearray) -> Any:
|