atlas

Research map / Large language models / Agents, code and math

RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing

ICML 2025 · Large language models › Agents, code and math · approach: Software engineering agents · 3 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes RepoAudit, an LLM agent that performs autonomous, demand-driven, path-sensitive repository-level bug detection (NPD, MLK, UAF) with a validator module to curb hallucinations.

Problem

Repository-level code auditing with LLMs is hindered by limited context windows, hallucinations that compound across prompts, and high time and token costs when analyzing large codebases for path-sensitive bugs.

Approach

An agent explores the repository function by function, using LLM-driven program abstraction, pointer handling, and feasible path exploration within each function, stores data-flow facts in agent memory, and validates outputs with a control-flow order check and an LLM-based path-condition satisfiability check before reporting bugs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
remove program abstraction (RepoAudit-NoAbs) (ablation)RepoAudit with Claude 3.5 Sonnet · NPD/MLK/UAF 15 projectstrue positives and false positives: TPs 13+8 vs 21+19 ... precision drops to 40.38%; FPs rise to 31 (vs full)Hurt
remove validators (RepoAudit-NoVal) (ablation)RepoAudit with Claude 3.5 Sonnet · NPD/MLK/UAF 15 projectsfalse positives: FPs increase to 38 (from 31 for NoAbs; full method precision 78.43%)Hurt
disable caching (RepoAudit-NoCache) (ablation)RepoAudit with Claude 3.5 Sonnet · NPD/MLK/UAF 15 projectsprompts and time cost: prompts 3.55x, time 3.75x, cost 3.48x; icu exceeds 72 hoursHurt
LLMDFA-PathScan vs RepoAudit (prompt rounds)NPD and UAF comparison · NPD/UAF benchmarksprompting rounds: 165x more prompts for LLMDFA-PathScan; 1737x for LLMDFA-SrcScanHurt
switch backbone from Claude 3.5 Sonnet to reasoning models (DeepSeek R1, Claude 3.7 Sonnet, o3-mini)RepoAudit · 15 benchmark projectsprecision: 88.46% / 86.79% / 82.35% vs 78.43%Helped

Surprising findings

Limitations

Experimental setup

Datasets: 15 real-world C repositories from existing studies (sofa-pbrpc, ImageMagick, coturn, libfreenect, openldap, libsass, mem

Benchmarks: 15 real-world C projects with NPD, MLK, UAF bugs ten actively maintained repositories for new bug discovery

Metrics: precision true positives false positives # prompts input/output tokens financial cost time

Baselines: LLMDFA Meta Infer Amazon CodeGuru single-function LLM detector multiple-function LLM detector

Builds on: LLMDFA tree-sitter chain-of-thought prompting

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy