Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 23 min read How-to mediumAdept

How I hunt for vulnerabilities with AI

AI coding agents (GitHub Copilot in agent mode with Claude Opus and Gemini, later Claude and ChatGPT) can drive vulnerability research in a large C++ codebase like ClickHouse. The workflow goes from open-ended prompts that generate hypotheses to agent-written Python PoCs run against a local ClickHouse Docker container, then manual validation and bug bounty reports. Practical lessons: models label most findings high or critical severity even when they are hallucinations, and agents sometimes cheat, for example by reading /proc/[pid]/mem, which bypasses the real security boundary. Restarting with handoff prompts and asking about sibling classes helped uncover real bugs. Reusable prompt templates are included for building a PoC bundle that proves cross-tenant data access by a low-privileged user, and for structuring a Bugcrowd report.

Assumes: LLM coding agentsDocker basicscommon vulnerability classes

Related posts

  • ClickGap: Autonomous QA for ClickHouse

    ClickHouse mediumAdept

    ClickGap is an autonomous QA agent that reviews every pull request merged into ClickHouse, writes and runs tests against real builds, bisects regressions, and files issues and test-only PRs without human sign-off. In five months it filed about 500 issues and 200 coverage PRs, more than half of the issues already closed as completed. Candidate findings must survive an adversarial reviewer and ten gates, eight enforced as plain code, including executed reproducers, valid citations, existing-test searches, mutation kill-tests for coverage claims, and matching against past false positives. Reviews cost a couple of dollars each, smaller models handle recoverable subtasks, and every cost cut must pass a recall benchmark that replays previously confirmed bugs.

  • Your AI agent fixed the bug, but what else did it change?

    Trail of Bits mediumAdept

    Trail of Bits released two agent plugins, patching-bugs and regression-hunt, that delegate bug reproduction, patch development and regression checking to AI agents. Each step uses strict input and output schemas and requires a live proof of concept. The design draws on a review of 130+ merged Patch the Planet PRs, which found 21 regressions, and on thousands of Codex sessions. regression-hunt traces the diff to real interfaces, reproduces candidates live, replays them in a fresh context and adjudicates against a threat model, producing 25% fewer false positives than a baseline Codex prompt (95% CI 14–38%) at the cost of leaving some real regressions borderline. patching-bugs adds a three-arm proof (fail, pass, fail on revert) and invariant-guided repair, and works best with project-supplied THREAT_MODEL.md and PATCHING_GUIDELINES.md files.

  • Meet GroeneAI: our autonomous contributor to ClickHouse

    ClickHouse mediumAdept

    GroeneAI is a fully autonomous AI agent, built on the open-source Nerve runtime, that finds, reproduces and fixes ClickHouse bugs from CI failures, fuzzer findings and user reports, then shepherds its PRs through CI and review; it has passed 3,000 merged PRs. Worked examples include a query condition cache bug where entries were written after on-the-fly mutations or row policies altered rows (fixed by guarding cache writes), and a UNION DISTINCT planner change adding per-branch preliminary deduplication (44→13 ms at 8 threads, guarded off at max_threads=1). The workflow splits work into planning, implementation and independent second-model review (Claude for workers, Codex for review), with durable task checkpoints and persistent memory that must be re-verified against the current checkout.

  • Cyber Chaos Monkey: Staying ahead of security threats with AI agents

    Shopify Engineering mediumAdept

    Shopify's Cyber Chaos Monkey (CCM) is an agentic vulnerability hunter that attacks live production infrastructure using test shops, armed with source code, threat intel, past bug reports and deployment records. A Discovery component refines ideas and finds leads, and Sandbox agents exploit them by making live requests, reading production logs and iterating. Over tens of thousands of engagements it has produced dozens of impactful findings without an outage. Safety comes from Kubernetes job-per-engagement isolation, a credential-injecting proxy, an nginx egress allowlist, Rules of Engagement, and a two-person-integrity scheme in which a separately aligned judge agent on a different model watches the executor in real time and can kill it, with fail-closed heartbeats in the pod's orchestrator.

  • Coding Agent Horror Stories: The CVE That Did Not Exist

    Docker mediumAdept

    A self-hosted, read-only AI code review bot running on Ollama answered a routine PostgreSQL 16.11→16.13 patch bump with a 1,500-word report alleging an "architectural takeover". The report cited a nonexistent CVE, named Kubernetes resources that did not exist and urged revoking all IAM access. Read-only permissions stopped the agent from acting, but its output could still push a human with real access into causing an outage, so agent output should be treated as untrusted input. The walkthrough moves the reviewer into a Docker Sandbox microVM with the repo mounted read-only, no credentials, and deny-all networking except the model port. It also adds a CI step that checks every cited CVE ID against the NVD API and flags the review when any ID is fake.

The quest for software engineering knowledge.

Look:
Layout: