Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
FLAWED — Fix-Like Artifacts With Embedded Defects | Kitploit
Tools/GitHubGitHub/off-by-1-labs/flawed
Defensive ToolsStatic AnalysisVulnerability ScannersDynamic Analysis (Sandboxing)Vulnerability AnalysisCode AnalysisFuzzingMachine LearningPapers & ResearchLearning & EducationAI Security
2251 month agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
GitHub
off-by-1-labs/flawed

FLAWED

Fix-Like Artifacts With Embedded Defects

View Repository
Share
FLAWED

Fix Like Artifacts with Embedded Defects

A research harness for measuring how well AI agents patch vulnerabilities.

License MIT Python 3.11+ Requires Docker Agents Claude, Codex, Gemini

Quickstart · Datasets · Documentation · Security model · Contributing


FLAWED checks out an open-source project at a known-vulnerable commit, hands an AI agent a description of the bug, and asks it to write a patch. The agent never sees the real upstream fix.

Every patch is then validated, audited, and graded in isolated containers, so you can see not just whether the model fixed the bug, but whether it introduced new ones along the way.

How it works

root@kitploit:~
flowchart LR
    spec[bug spec] --> clone
    clone["clone<br/>(open net)"] --> generate
    generate["generate<br/>(offline)"] --> validate
    validate["validate<br/>(offline)"] --> ast["ast<br/>(offline)"]
    generate -.->|"patch.diff"| store[(Postgres)]
    validate -.->|"verdict"| store
    ast -.->|"summary"| store
    store --> ui[web UI + notebook]
Download Tool

Each stage runs in its own container. Only clone has network access. Every later stage is locked down to the LLM provider's API, so agents can't fetch hints or the upstream fix mid-run.

Features

FeatureWhat it gives you
Repeated samplingA run executes N iterations of the same input, so results are distributions, not anecdotes.
CampaignsSweep one bug across patcher variants and prompt styles, from a vague "fix this plz" to a full advisory, and compare outcomes on a live dashboard.
Outcome gradingEvery patch lands in one of five scenarios, from S1 (clean fix) to S5 (didn't fix the bug and introduced a new vulnerability).
Cross-validationPatches are re-judged by other models, and the headline numbers average the self- and cross-validation lenses so no single judge's bias dominates.
Cheat detectionAn auditor flags iterations where the agent found the upstream fix instead of solving the bug itself.

FLAWED drives the Claude, Codex, and Gemini CLIs head-to-head with the same inputs.

Quickstart

[!WARNING] FLAWED mounts the Docker socket (root-equivalent on the host) and executes untrusted third-party code inside its stage containers. Run it on a machine you trust to carry that workload. See docs/security-model.md.

You need Docker, with the daemon socket accessible.

root@kitploit:~
# 1. Configure. Writes .env for you (data dir + provider API keys)
./setup.sh

# 2. Bring up the stack (Postgres, API + worker, web UI, notebook)
docker compose up --build

# 3. Open http://127.0.0.1:8080

Then take your first run.

  1. Import a bug spec. Example specs ship under bugs/. Drag one into the web UI's Bug Specs page, or use the CLI.
    root@kitploit:~
    ./scripts/import-all-bugs.sh
    
  2. Launch a run from the web UI. Pick the spec, an agent + model, a variant, and an iteration count. The run page streams progress live.

[!NOTE] The first run against a large upstream (e.g. Chromium) is slow. The validate stage clones the whole repo once to diff against the real upstream patch. The clone is cached and reused afterwards.

On-host development setup (no compose)

You need Docker, Node 20+, pnpm, uv, and @devcontainers/cli (npm i -g @devcontainers/cli). Nix users can nix-shell for everything except Docker.

root@kitploit:~
make dev                        # uv sync + web deps
docker compose up -d postgres   # FLAWED needs a Postgres to talk to
cp .env.example .env            # points FLAWED_DB_URL at it
uv run flawed init              # builds base images, creates the schema
uv run flawed serve             # API + worker + webapp on port 8080

For the web dev loop, run make web-dev in a second terminal. It serves the UI on port 5173 and proxies /api to flawed serve.

An isolated devcontainer for running AI coding agents against this repo safely is documented in .devcontainer/README.md.

Bug specs

A bug spec is the unit of input. It carries a repo, a vulnerable commit, a bug description, an optional reproducer, and a set of prompt variants that model how the bug might realistically be reported (SAST finding, bug-bounty report, embargoed advisory, raw PoC, …). Specs are versioned and immutable, so a historical run's prompt and verdict never silently change.

The JSON contract lives in bugs.schema.json and is documented in docs/bug-specs.md. All bundled specs describe publicly disclosed, upstream-fixed vulnerabilities.

Storage

Postgres is the single source of truth. Run metadata and artifact bytes (patches, verdicts, transcripts, logs) live in the database, so a deployment is fully captured by its DB. The data/ directory is transient scratch that stages mount at runtime.

  • Back up / restore a whole deployment with scripts/export_dataset.py and scripts/import_dataset.py (also available from the web UI).
  • Rebuild an on-disk artifact tree for offline inspection with scripts/export_artifacts.py.
  • Schema changes are managed with Alembic (uv run alembic upgrade head runs automatically at startup).

Datasets

We publish pre-built datasets so you can load completed campaigns instead of running everything yourself. Each dataset is a .tar.gz of one full snapshot, hosted at https://flawed.s3.us-east-1.amazonaws.com.

All campaigns in a single bundle.

BundleArchive
All campaignsfull.tar.gz
Per-campaign archives, one per patcher model (13)
CampaignPatcher modelSizeArchive
CVE-2026-22738 (Spring AI SpEL injection)claude-opus-4-8515.0 MB.tar.gz
CVE-2026-22738 (Spring AI SpEL injection)gpt-5.5663.9 MB.tar.gz
CVE-2026-31431 (Linux algif_aead)claude-opus-4-81.1 GB.tar.gz
CVE-2026-31431 (Linux algif_aead in-place)gpt-5.5966.9 MB.tar.gz
CVE-2026-34197 (ActiveMQ Jolokia RCE)claude-opus-4-8645.2 MB.tar.gz
CVE-2026-34197 (ActiveMQ Jolokia RCE)gpt-5.5819.0 MB.tar.gz
CVE-2026-45185 (Exim BDAT use-after-free)claude-opus-4-81.1 GB.tar.gz
CVE-2026-45185 (Exim BDAT use-after-free)gpt-5.51.0 GB

From the web UI (recommended)

Snapshots → Import datasets, paste one of the archive links above, and click Find archives. FLAWED imports a direct .tar.gz link as-is and unpacks it into your snapshots. Then restore it from the snapshots list (restore is a separate, explicitly-confirmed step).

Import discovers multiple archives at once only when the URL is a listable bucket or a directory index page. Neither applies here, so import the links one at a time.

By hand

Download an archive, unpack it into the snapshots directory (FLAWED_HOST_SNAPSHOT_DIR, or ./flawed-snapshots by default), and it shows up in the snapshots list ready to restore.

root@kitploit:~
curl -LO https://flawed.s3.us-east-1.amazonaws.com/compressed/campaigns/full/cve-2026-45185-exim-bdat-uaf_full_gpt-5.5_1782988292.tar.gz
mkdir -p "$FLAWED_HOST_SNAPSHOT_DIR"
tar -xzf cve-2026-45185-exim-bdat-uaf_full_gpt-5.5_1782988292.tar.gz -C "$FLAWED_HOST_SNAPSHOT_DIR"

Importing only stages the bundle on disk. Restoring it, which replaces the current deployment, is done separately from the snapshots page.

Documentation

DocWhat's in it
docs/architecture.mdComponents, data flow, storage layout
docs/pipeline.mdThe stages, iteration semantics, container layout
docs/security-model.mdPer-stage network policy, sandboxing, threat model
docs/bug-specs.mdInput contract, prompt composition, versioning
docs/cli.mdflawed command reference + env vars
docs/webapp.mdUI tour
docs/notebook.mdJupyterLab integration + the flawed helper module

Repository layout

root@kitploit:~
packages/
  flawed-core/             models, DB schema, settings
  flawed-orchestrator/     run lifecycle, worker pool, devcontainer driver
  flawed-stage-*/          the pipeline stages (clone, generate, validate, …)
  flawed-agent-runner/     runs INSIDE the container (Claude / Codex / Gemini CLIs)
  flawed-api/              FastAPI + SSE + notebook proxy
  flawed-cli/              the `flawed` CLI
apps/web/                  React + Vite + Tailwind webapp
containers/                base image, network lockdown, notebook container
bugs/                      example bug specs
docs/                      documentation (see above)

Development

TaskCommand
Sync all Python + Node depsmake dev
Run testsmake test
Lintmake lint
Auto-formatmake format
Web dev server (port 5173)make web-dev
E2E smoke testmake e2e

Tests need Docker. They spin up their own Postgres via testcontainers.

License & contributing

FLAWED is released under the MIT License. Contributions are welcome. See CONTRIBUTING.md, and please report security issues privately per SECURITY.md.

.tar.gz
CVE-2026-8512 (Chromium fsevents UAF)claude-opus-4-8500.7 MB.tar.gz
CVE-2026-8512 (Chromium fsevents UAF)gpt-5.5342.7 MB.tar.gz
freenginx-26 (Perl SV refcount UAF)gpt-5.5166.4 MB.tar.gz
GHSA-wpqr-6v78-jr5g (Gemini CLI trust model)claude-opus-4-81.2 GB.tar.gz
GHSA-wpqr-6v78-jr5g (Gemini CLI trust model)gpt-5.51.3 GB.tar.gz