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

Jinyao Guo, Chengpeng Wang, Xiangzhe Xu, Zian Su, Xiangyu Zhang
2/14/2026

No official code found. Best implementation: PurCL/RepoAudit (428 stars, last commit 2026-03-12).

Abstract

Code auditing is the process of reviewing code with the aim of identifying bugs. Large Language Models (LLMs) have demonstrated promising capabilities for this task without requiring compilation, while also supporting user-friendly customization. However, auditing a code repository with LLMs poses significant challenges: limited context windows and hallucinations can degrade the quality of bug reports, and analyzing large-scale repositories incurs substantial time and token costs, hindering efficiency and scalability. This work introduces an LLM-based agent, RepoAudit, designed to perform autonomous repository-level code auditing. Equipped with agent memory, RepoAudit explores the codebase on demand by analyzing data-flow facts along feasible program paths within individual functions. It further incorporates a validator module to mitigate hallucinations by verifying data-flow facts and checking the satisfiability of path conditions associated with potential bugs, thereby reducing false positives. RepoAudit detects 40 true bugs across 15 real-world benchmark projects with a precision of 78.43%, requiring on average only 0.44 hours and $2.54 per project. Also, it detects 185 new bugs in high-profile projects, among which 174 have been confirmed or fixed. We have open-sourced RepoAudit at https://github.com/PurCL/RepoAudit.

View on arXivView PDF

Code Implementations(1)

PurCL/RepoAuditCommunity72%

An autonomous LLM-agent for large-scale, repository-level code auditing

42855Go, C++Apr 1, 20257 months agoNOASSERTION
code-auditingneuro-symbolic-static-analysissecurity-tools

Similar Papers

Cite this paper

@article{guo2026repoaudit,
  title  = {RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing},
  author = {Jinyao Guo and Chengpeng Wang and Xiangzhe Xu and Zian Su and Xiangyu Zhang},
  year   = {2026},
  eprint = {2501.18160},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2501.18160},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.18160.svg)](https://codeofpaper.com/paper/2501.18160)

Discussion