🇺🇸 English | 中文
CodeAuditor is a multi-stage, agentic code-auditing pipeline powered by the Claude Agent SDK or the Codex App Server Python SDK. It researches a target project, finds and evaluates security bugs, reproduces confirmed vulnerabilities, and prepares disclosure-ready reports.
It has helped discover CVEs in widely used open-source projects; see Vulnerabilities found.
An audit runs through seven stages:
| Stage | Purpose |
|---|---|
| 0 | Update the target repository and prepare the output directory |
| 1 | Research security context and define the audit focus |
| 2 | Decompose the codebase into analysis units (AUs) |
| 3 | Find bugs in each analysis unit |
| 4 | Evaluate reachability, impact, and severity |
| 5 | Reproduce confirmed vulnerabilities and capture evidence |
| 6 | Prepare a report, email, minimal PoC, and disclosure package |
Outputs are validated and checkpointed between stages. Stage 1's project-specific audit focus and vulnerability criteria guide the later analysis.
- Python 3.12+
- uv for dependency management and builds
- Git; Docker Engine is required only for Docker sandbox modes
- Claude Code, or a Codex CLI with
codex app-serversupport; select the backend in Web settings
git clone https://github.com/COCOP1l0t/CodeAuditor.git
cd CodeAuditor
uv sync --lockedStart the Web UI and open http://127.0.0.1:8000:
uv run code-auditorThe Web UI has no account, password, login, or session authentication. It binds to 127.0.0.1 by default; only bind to another interface on a trusted network or behind your own access proxy.
Web server options:
| Flag | Description |
|---|---|
--host |
Bind address; default 127.0.0.1 |
--port |
Listen port; default 8000 |
Audit parameters such as repository, Wiki, backend, model, sandbox mode, parallelism, and output paths are managed in the Web UI and ~/.code_auditor/settings.json. In New Audit, the target can be a managed checkout, a remote Git URL, or a local code folder selected with the native folder picker. Local folders are audited in place without running git pull. Run code-auditor --help for maintenance commands.
Stage 5 and 6 can use a networked Docker sandbox, a network-isolated Docker sandbox, or a local detached worktree. The Web settings enable Docker choices only after the server passes its Docker, image, disk-space, and Agent runtime checks. Docker is the default; build its image once before an audit reaches reproduction:
docker build -f docker/code-auditor-sandbox.Dockerfile \
-t code-auditor-sandbox:latest dockerIn Settings → Stage 5/6 execution, select Docker (the server's default Docker runtime), gVisor (runsc), or Local worktree. For containers, choose bridge networking or no network separately. The selected runtime must already be registered in Docker; an unavailable runtime fails the check or launch without falling back. Settings apply to new jobs and resumed executions. Offline mode also disables the containerized Agent's access to model APIs.
Each new container launch pins the image ID and records the inspected runtime, resource settings, exit status, and verified cleanup under .sandbox-executions/. Its Agent logs are written by the host outside the container's mounts and survive scratch cleanup; these host-side records are not displayed in the Web UI and remain readable through the API. Older artifacts without records retain an unknown environment. See sandbox operation and optional gVisor checks.
The Reproduce tab retests an active Disclosure against the fetched remote default-branch HEAD. It records the immutable tested SHA, runs the retained reproducer in the configured Stage 5/6 sandbox, and then asks an Agent to analyze the current source and propose a Disclosure update. Runtime outcome, evidence level, and Agent disposition are stored separately. A successful retest creates a local draft only; Apply Draft archives the previous Disclosure revision and installs the validated draft without sending or publishing it.
Disclosure deduplication, static quality checks, and evidence-state handling are described in Disclosure review. The Disclosure recycle bin supports permanent cleanup of one or more selected records; cleanup removes only their registered, unshared Stage 5 PoC and Stage 6 Disclosure artifacts.
The Web UI discovers knowledge bases under ~/.code_auditor/wiki/. CodeAuditor treats the selected Wiki as read-only and uses available pages as supporting context rather than vulnerability evidence.
See QEMU-Security-Wiki for an example.
{output-dir}/
├── stage1-security-context/
├── stage2-analysis-units/
├── stage3-findings/
├── stage4-vulnerabilities/
├── stage5-pocs/
├── stage6-disclosures/
├── .sandbox-executions/ # Host-written container records and Agent logs
└── .markers/
The same repository commit reuses its output directory and resumes from checkpoints. Delete the output directory, or its .markers/ directory, to start over.
Interrupted Web jobs are resumed automatically by default. Set CODE_AUDITOR_AUTO_RESUME_INTERRUPTED=0 to disable this. Large clones can use a shallow depth with CODE_AUDITOR_GIT_CLONE_DEPTH=1; a full-history clone that reaches the timeout automatically retries once at depth 1. CODE_AUDITOR_GIT_CLONE_TIMEOUT_SECONDS changes the timeout.
Stage 5 reproduces Critical and High findings by default. Enable Full analysis in New Audit, or set CODE_AUDITOR_FULL_ANALYSIS=1, to reproduce every severity. CODE_AUDITOR_MAX_STAGE5_VULNS can cap PoC work and CODE_AUDITOR_MIN_STAGE5_CVSS can apply an additional threshold. Stage 6 validates disclosure artifacts and performs one bounded delivery repair when only packaging defects remain.
uv sync --locked
uv run pytest -q
uv builduv sync installs the default dev dependency group. Tests do not make real agent calls.
Vulnerabilities CodeAuditor has helped discover and disclose:
| CVE ID | Project | CVSS Base Score | Severity | Reference |
|---|---|---|---|---|
| CVE-2026-28780 | httpd | 9.8 | Critical | GitHub |
| CVE-2026-34032 | httpd | 5.3 | Medium | GitHub |
| CVE-2026-40312 | ImageMagick | 5.5 | Medium | GitHub |
| CVE-2026-40385 | libexif | 7.1 | High | GitHub |
| CVE-2026-40386 | libexif | 7.1 | High | GitHub |
| CVE-2026-7180 | QEMU | / | / | GitLab |
| CVE-2026-8341 | QEMU | 6.5 | Medium | #3750 |
| CVE-2026-8343 | QEMU | 5.3 | Medium | #3791 #3807 #3827 |
| CVE-2026-8348 | QEMU | 4.4 | Medium | #3810 |
| CVE-2026-9238 | QEMU | 5.5 | Medium | #3820 |
| CVE-2026-15705 | QEMU | 5.3 | Medium | #3808 |
| CVE-2026-41437 | QEMU | / | / | #3711 |
| CVE-2026-41439 | QEMU | / | / | #3714 |
| CVE-2026-48914 | QEMU | 6.7 | Medium | GitLab |
| CVE-2026-48915 | QEMU | 6.1 | Medium | #3857 |
| CVE-2026-61405 | QEMU | 6.0 | Medium | #3890 |
| CVE-2026-61406 | QEMU | 6.5 | Medium | #3899 |
| CVE-2026-61476 | QEMU | 4.4 | Medium | #3875 |
| CVE-2026-63324 | QEMU | / | / | #3984 |
| CVE-2026-124559 | QEMU | / | / | #3796 |
| CVE-2026-126657 | QEMU | / | / | #3815 |
| CVE-2026-53701 | GStreamer | 6.5 | Medium | #5035 |
| CVE-2026-53702 | GStreamer | 6.5 | Medium | #5036 |
| CVE-2026-53703 | GStreamer | 7.1 | High | #5038 |
| CVE-2026-53704 | GStreamer | 7.1 | High | #5039 |
CodeAuditor is intended for auditing code you own or have explicit permission to test, and for coordinated disclosure to upstream maintainers. Do not use it to target systems or projects without authorization.
Important: Before sending any vulnerability report to project maintainers, manually review the generated disclosure materials. Verify that the vulnerability is real, the severity assessment is accurate, and the proof-of-concept actually reproduces the issue. Automated findings may contain false positives or inaccuracies that could waste maintainers' time or damage your credibility.
Apache License 2.0 — see LICENSE for details.
This software is provided for educational, research, and experimental purposes only. See the disclaimer at the top of the LICENSE file.
