@mamdouh-aboammar/bug-killer

中文文档
0.2.0发布于 2026/11/02SEE LICENSE IN LICENSECommonJS零依赖

Autonomous Vulnerability Discovery & Self-Healing Engine for Deep and Ghosty Bugs

原始使用文档
文档目录23 节
  1. Autonomous Vulnerability Discovery & Self-Healing Engine fo…
  2. Fast Installation
  3. Method 1: Universal 1-Line Installer (macOS & Linux)
  4. Method 2: Global NPM / Bun Package
  5. Method 3: Cargo (Rust Toolchain)
  6. Method 4: Makefile / System Install
  7. Quickstart for Any Project
  8. 🤖 Copyable Agent Prompt (For Cursor, Claude Code, Gemini CL…
  9. One place to assess, investigate, and repair
  10. What works in the current code
  11. Common workflows
  12. Check a repository or CI job
  13. Investigate a dependency or runtime
  14. Get security guidance for a coding task
  15. Preview a fix, then use operator approval
  16. Connect a coding agent through MCP
  17. Microservices architecture
  18. Polyglot specialization matrix
  19. Build the full stack
  20. Shell Auto-Completions
  21. The agentic security room roadmap
  22. Development and verification
  23. License and responsible use

Bug Killer (bug-killer / bk)

Autonomous Vulnerability Discovery & Self-Healing Engine for Deep and Ghosty Bugs

CI Pipeline Language Architecture License Security Policy

"Let Your AI Find The Deep and Ghosty Bugs, Vulnerabilities, Security Issues and Heal From It — Tested & Verified."

Bug Killer is an offline-first, polyglot defensive security system engineered to discover elusive runtime memory corruptions, verify reachability through static binary disassembly and kernel memory maps, execute atomic self-healing repairs, and guarantee bit-for-bit rollback.

Initial benchmark targets:

  • PHP2Shell (CVE-2026-109618 & CVE-2026-109619): Zend Engine allocator longjmp OOM heap corruption and persistent worker Use-After-Free.
  • Node2Shell (CVE-2026-111497): Bundled Google Brotli decoder out-of-bounds memory write in node:zlib.

Fast Installation

Choose the installation method suited to your environment:

Method 1: Universal 1-Line Installer (macOS & Linux)

curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/bug-killer/master/scripts/install.sh | bash

Installs bk and bug-killer into ~/.local/bin, generates shell auto-completions for Bash/Zsh/Fish, and runs system health diagnostics.

Method 2: Global NPM / Bun Package

# Using Bun (recommended)
bun add -g bug-killer-cli

# Or using NPM / NPX
npm install -g bug-killer-cli

# Or execute instantly without permanent installation
npx bug-killer-cli init

Method 3: Cargo (Rust Toolchain)

# Install directly from GitHub
cargo install --git https://github.com/imMamdouhaboammar/bug-killer.git --bin bk --bin bug-killer

# Or from a local clone
cargo install --path .

Method 4: Makefile / System Install

make build
sudo make install

Both bk (concise daily CLI) and bug-killer (canonical binary) are available on your PATH.

Quickstart for Any Project

Run three commands in any repository (Python, Node/TS, Go, Rust, PHP, C/C++, Docker):

# 1. Onboard project (detects stack, sets baseline, installs pre-commit hook)
bk init

# 2. Run a fast security scan (<50ms, ideal for pre-commit & CI)
bk security scan . --profile quick

# 3. Configure Model Context Protocol (MCP) for Cursor, Claude Code, or Gemini CLI
bk mcp config --host cursor

To run a machine-readable scan report:

bk security scan . --profile quick --json

Initialization (bk init) writes project security configuration (.bugkiller/config.json), runs a baseline scan, protects identity keys in .gitignore, and installs a non-destructive Git pre-commit hook by default. Run a read-only scan first (bk security scan . --profile quick) if you only want to inspect the project without configuring it.

🤖 Copyable Agent Prompt (For Cursor, Claude Code, Gemini CLI, Copilot)

Copy and paste this directive directly into your AI coding assistant (Cursor chat, Claude Code, Gemini CLI, Windsurf, or Antigravity) to have it install, configure, and audit your project automatically:

You are paired with me on this repository. We are adopting **Bug Killer (`bk`)** as our defensive security analysis, vulnerability detection, and virtual healing framework.

Execute the following setup and audit sequence autonomously:

1. **Verify or Install Bug Killer:**
   Check if `bk` is installed (`command -v bk`). If not found, install via:
   ```bash
   curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/bug-killer/master/scripts/install.sh | bash
   # Or via npm/bun: bun add -g bug-killer-cli
   ```

2. **Run System & Environment Diagnostics:**
   ```bash
   bk doctor .
   ```

3. **Initialize Repository Baseline & Pre-Commit Security Gate:**
   ```bash
   bk init .
   ```
   *This detects our tech stack, creates `.bugkiller/config.json`, computes a clean baseline snapshot, safeguards keys in `.gitignore`, and installs the staged Git pre-commit hook.*

4. **Audit for Vulnerabilities & Taint Exposures:**
   ```bash
   bk security scan . --profile project
   bk scan . --taint --osv
   ```

5. **Examine Findings & Plan Safe Remediation:**
   - If vulnerabilities or exposures are detected:
     - Run `bk evidence <finding-id> .` to inspect verified AST/taint traces and cryptographic receipts.
     - Run `bk plan <finding-id> .` to generate a deterministic, non-mutating virtual patch preview.
     - Present the evidence and plan to me before any state mutation.

One place to assess, investigate, and repair

A scanner finding is the start of a security decision. You still need to know which files and dependencies were checked, whether the issue affects the running software, and whether a proposed fix survives verification.

Bug Killer brings those steps together:

  1. Inspect the target. Inventory source files, manifests, runtimes, and applicable security checks.
  2. Collect evidence. Record findings, affectedness, uncertainty, and gaps in scan coverage.
  3. Investigate. Use source analysis, optional advisory lookups, bounded agent investigations, or approved runtime checks.
  4. Plan the repair. Review a proposed change before granting write access.
  5. Verify the result. Recheck the affected property and retain rollback evidence when a change is approved.

What works in the current code

CapabilityCurrent interfaceImportant boundary
Workspace and runtime scanningbk scan, bk doctorEvidence depends on the target and available runtime data
Security catalog and guardbk security scan, bk security catalog, bk security verifyThe 373-entry catalog is a taxonomy; supported and executed checks are reported separately
Dependency advisoriesbk osv, bk scan --osv, bk security scan --osvOSV queries require network access; a version match does not prove exploitability
Source analysisbk scan --taint, structural and built-in engine modulesLanguage, rule, and analysis depth vary; unsupported paths must remain visible
Agent-assisted investigationbk agent doctor, bk agent investigateInvestigation is bounded and read-only; remote model access requires configuration and data-export policy
Coding-agent accessbk mcp serve, bk mcp configLocal stdio transport; read-only is the default
Supervised remediationbk heal --dry-run, bk plan, bk approve, bk apply, bk rollbackPrivileged changes require separate operator approval and verification

The source also contains an analyzer adapter registry, an execution protocol, and a benchmark harness. Connecting a mature external scanner does not automatically make it part of a released scan profile. Availability, license, output fidelity, and coverage must be tested per adapter.

Common workflows

Check a repository or CI job

bk security scan . --profile project --json
bk security scan . --profile ci --fail-on high
bk security scan . --profile quick --staged

--staged evaluates the staged Git snapshot for pre-commit use. CI can block on findings or incomplete mandatory coverage; a report with no findings is not proof that every check ran.

Investigate a dependency or runtime

bk doctor . --json
bk scan . --check-runtime --json
bk scan . --osv --taint --json
bk cve-info CVE-2026-109618

--osv makes external advisory requests. Use it when the workspace and network policy permit those requests. Live endpoint probing is separate and requires authorization for the exact target.

Get security guidance for a coding task

bk security guidance "Add a file upload endpoint" --language rust
bk security catalog --json
bk agent doctor --provider local --json

Guidance and model-generated hypotheses are inputs for review. They do not certify that code is safe or authorize a fix.

Preview a fix, then use operator approval

bk heal . --dry-run
bk evidence <finding-id> .
bk plan <finding-id> .

After provisioning a separate operator signing key and reviewing the plan, the authorized operator can use bk approve and bk apply. See Operator approval setup for the trust and receipt requirements.

bk heal --apply and bk heal --auto-apply are deprecated shortcuts that the CLI rejects. They cannot bypass independent approval. A successful patch command alone does not prove remediation.

Connect a coding agent through MCP

bk mcp config --host codex
bk mcp config --host claude
bk mcp serve --transport stdio .

The configuration command prints host-specific examples. The MCP server communicates over standard input and output; it does not expose a network listener by default. See the operator guide for scope and permission details, and the sibling tools specification for external engine broker coordination.

Microservices architecture

The Rust CLI is the main local entry point. Additional services cover inventory, binary inspection, and supervised host changes. They are separate build targets, so ordinary source scans do not require starting the full service stack.

flowchart TD
    A["Authorized project or host"] --> B["Rust CLI and security guard"]
    B --> C["Built-in analysis and optional advisory checks"]
    C --> D["Findings, coverage, and evidence"]
    D --> E["Review and operator approval"]
    E --> F["Scoped repair and independent verification"]
    G["Go inventory and Rust inspector services"] --> D
    F --> H["Rollback records"]

Polyglot specialization matrix

ComponentLanguageResponsibility
bug-killer (bk)Rust 2024CLI, security guard, scanning, evidence, MCP, agent investigation, and repair coordination
bug-killer-orchestratorGoFilesystem and host inventory; separate service
bug-killer-inspectorRust 2024Binary inspection using goblin and memmap2
bug-killer-healerGoHost-specific supervised remediation service

Build the full stack

The full build needs Rust, Go 1.26.5 or a compatible newer toolchain, Make, and platform-specific native dependencies. Inspector and orchestrator builds may require protobuf and libpcap development packages.

make build
make test
make lint

To install the resulting executables, choose an appropriate PREFIX and run make install with write permission to that directory. The Makefile's default is /usr/local/bin and shell completions are installed to /usr/local/share (SHARE_PREFIX).

Shell Auto-Completions

Bug Killer distributes pre-generated, drift-checked completion scripts under completions/ for Bash, Zsh, and Fish:

# Generate dynamically for any supported shell (bash, zsh, fish, powershell, elvish)
bug-killer completion bash > ~/.local/share/bash-completion/completions/bug-killer
bug-killer completion zsh > ~/.zsh/completion/_bug-killer
bug-killer completion fish > ~/.config/fish/completions/bug-killer.fish

# Or regenerate and install from repository assets
make completions
sudo make install

Docker Compose is available for controlled Linux-host deployments. Access to /var/run/docker.sock can grant broad host control, even when mounted read-only. Use the service stack only on hosts where that access is explicitly approved.

The agentic security room roadmap

The Ultimate Spec defines Bug Killer's next product direction: an agentic workspace that selects and coordinates mature security tools, keeps their evidence separate, and helps a human approve and verify repairs.

Planned capabilityWhy it mattersCurrent status
Tool discovery and capability checksKnow which engine is installed, applicable, licensed, and healthySpecified; not a complete public workflow
Multi-tool execution plannerChoose suitable tools for each authorized target and resource budgetProposed
External SAST and SCA adaptersReuse tools such as Semgrep, CodeQL, Trivy, and OSV-Scanner where suitableEvaluated as candidates; not claimed as bundled integrations
Research tool coordinationRun target-specific fuzzers and experiments under isolation and consentProposed research workflow
Correlated evidence and independent recheckSeparate repeated signals from genuine corroboration; prove that a fix was testedContracts and acceptance criteria specified

The goal is coordination over reinvention. Existing engines do the specialized analysis. Bug Killer selects them, enforces scope and budgets, records what actually ran, and presents evidence that a developer or security reviewer can act on.

The architecture is deliberately incremental. A registered tool, a catalog entry, or an agent's confident explanation is never enough to claim complete security coverage.

Development and verification

cargo test --workspace
cargo clippy --all-targets -- -D warnings

# Run from each Go service directory
cd services/orchestrator && go test -v ./... && go vet ./...
cd ../healer && go test -v ./... && go vet ./...

The separate Rust inspector has its own tests under services/inspector. The repository's make test and make lint targets cover the configured Rust and Go projects.

Security reports need more than a passing build. Detection claims require reproducible fixtures and coverage receipts; repair claims require a fresh recheck of the changed target. See the contribution instructions and security policy.

License and responsible use

Bug Killer uses the Source-Available & Business Attribution License v1.0, copyright © 2026 Mamdouh Aboammar.

  • You may inspect, fork, modify, and contribute while retaining the required attribution and license terms.
  • Internal use by businesses, non-profits, educational organizations, and government teams is permitted without royalties.
  • Selling Bug Killer or derivatives, or offering them as a paid hosted or managed security service, requires separate written commercial authorization.
  • Public derivatives must retain the same license terms, copyright, and author attribution.

The LICENSE governs use and redistribution. Third-party analyzers and their rules may carry separate terms.

Only assess systems you own or have explicit permission to test. Bug Killer's defensive scope excludes weaponized exploits and unauthorized probing. Report issues in Bug Killer itself through SECURITY.md.

版本与发布记录

@mamdouh-aboammar/bug-killer 共发布 2 个版本,首次发布于 2026/11/02;过去 12 个月发布了 2 个版本。

版本发布日期距今
0.2.0latest2026/11/021 天前
0.0.0-stage2026/11/021 天前

关于 @mamdouh-aboammar/bug-killer 的常见问题

@mamdouh-aboammar/bug-killer 是什么?

自主漏洞发现和自我修复引擎深层和幽灵的bug

如何安装 @mamdouh-aboammar/bug-killer?

在项目目录运行 npm install @mamdouh-aboammar/bug-killer,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bk、bug-killer,可以用 npx bk 直接运行。

@mamdouh-aboammar/bug-killer 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/mamdouh-aboammar__bug-killer 是否存在。

@mamdouh-aboammar/bug-killer 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@mamdouh-aboammar/bug-killer 可以商用吗?

@mamdouh-aboammar/bug-killer 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@mamdouh-aboammar/bug-killer 还在维护吗?

最新版本 0.2.0 发布于 2026/11/02(1 天前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/11/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。