Bugdar: AI-Augmented Secure Code Review for GitHub Pull Requests
John E. Naulty, Eason Chen, Joy Wang, George Digkas, Kostas Chalkias · 2025
Read Bugdar: AI-Augmented Secure Code Review for GitHub Pull Requests by John E. Naulty, Eason Chen, Joy Wang, George Digkas, Kostas Chalkias (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-17302.txt.
Introduction
John Naulty and co-authors build an AI code reviewer in 2025 that hunts security flaws inside GitHub pull requests. Hand audits are slow and dear, while older auto tools cry wolf so often that teams tune them out. Their system, Bugdar, aims for near real-time, project-aware feedback at the moment code is proposed.
Language models tuned for the task, fed with project documents, shape the reviews to each codebase's habits. It reads several languages, from Python and Rust to two blockchain tongues. Speed averaged under a minute per request, far below the hours a hand review can take, they report. Catching flaws at proposal time, not after release, shifts security from a gate to a habit.
Catalog record
| CREATOR | John E. Naulty, Eason Chen, Joy Wang, George Digkas, Kostas Chalkias |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 17 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-17302
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Bugdar: AI-Augmented Secure Code Review for GitHub Pull Requests John E. Naulty, Eason Chen, Joy Wang, George Digkas, Kostas Chalkias Abstract As software systems grow increasingly complex, ensuring security during development poses significant challenges. Traditional manual code audits are often expensive, time-intensive, and ill-suited for fast-paced workflows, while automated tools frequently suffer from high false-positive rates, limiting their reliability. To address these issues, we introduce Bugdar, an AI-augmented code review system that integrates seamlessly into GitHub pull requests, providing near real-time, context-aware vulnerability analysis. Bugdar leverages fine-tunable Large Language Models (LLMs) and Retrieval Augmented Generation (RAGs) to deliver project-specific, actionable feedback that aligns with each codebase’s unique requirements and developer practices. Supporting multiple programming languages, including Solidity, Move, Rust, and Python, Bugdar demonstrates exceptional efficiency, processing an average of 56.4 seconds per pull request or 30 lines of code per second. This is significantly faster than manual reviews, which could take hours per pull request. By facilitating a proactive approach to secure coding, Bugdar reduces the reliance on manual reviews, accelerates development cycles, and enhances the security posture of software systems without compromising productivity. I Introduction Modern software systems have become increasingly complex, creating substantial challenges for security auditing processes. For example, in the DeFi sector, manual audits often take weeks to complete, with costs exceeding tens of thousands of dollars per project [ 1 ] . These manual audits, while thorough, are slow and expensive, delaying critical deployments. Automated tools offer speed but lack precision, often generating excessive false positives [ 2 ] . This trade-off highlights the need for an innovative solution that combines human-level expertise with the efficiency of AI. To address these challenges, we present Bugdar, an AI-augmented code review system that transforms the GitHub pull request workflow into a secure, efficient, and developer-friendly environment. Bugdar integrates fine-tunable Large Language Models (LLMs) to identify potential security flaws. Unlike traditional tools, Bugdar adapts dynamically to project-specific contexts by employing Retrieval Augmented Generation (RAGs), enabling context-aware and actionable feedback tailored to the unique characteristics of decentralized applications, smart contracts, and multi-language codebases. To be specific, Bugdar incorporates various features to enhance secure coding practices and streamline the development workflow. These features include: • Structured Vulnerability Reports: Generates detailed reports outlining potential security vulnerabilities, including severity, potential impact, and recommended remediation steps, mimicking the comprehensive output of experienced human auditors. • Prompt Engineering and Fine-tuning: Allows developers to customize the prompts used by the LLMs to target specific security concerns and fine-tune the models using project-specific datasets and human feedback. • Multi-Programming-Language Support: Analyze code written in various programming languages, including Move and Solidity smart contract languages, as well as Rust, TypeScript, Python, and Go, enabling a comprehensive security assessment across diverse technology stacks. • GitHub CI/CD Integration: Integrates as a GitHub app, providing security analysis and feedback directly within the pull request interface. These features collectively transform the way developers approach secure coding practices. By integrating seamlessly into the GitHub workflow, Bugdar fosters a proactive security mindset, enabling developers to address vulnerabilities early in the development lifecycle. This approach reduces the reliance on extensive manual reviews, minimizes delays in deployment, and enhances collaboration between security experts and development teams. Bugdar’s tailored and context-aware analysis empowers teams to focus on building robust and secure applications without compromising speed or agility. II Background and Related Work Fig. 1 : The diagram illustrated the architecture of the Bugdar system. Several researchers have investigated the use of LLMs for code-related tasks, including code generation, code summarization, and bug detection [ 3 , 4 , 5 , 6 , 7 , 8 ] . They find that LLMs demonstrated impressive capabilities in understanding and generating code by learning from large datasets of publicly available source code [ 9 ] . Recent studies have specifically examined LLMs’ effectiveness in vulnerability detection. [ 3 ] evaluated GPT-4 and Claude models on DeFi smart contracts, finding they correctly identify vulnerability types in 40% of cases, though with notable false positive rates. Similarly, VulBench [ 4 ] , a comprehensive vulnerability benchmark, demonstrating that several LLMs outperform traditional deep learning approaches in vulnerability detection. Traditional machine learning approaches for vulnerability detection often rely on handcrafted features or require structured representations of code, such as abstract syntax trees (ASTs) [ 10 ] . However, these methods can be limited in scalability and effectiveness when dealing with complex or obfuscated code [ 11 ] . Bugdar addresses this challenge by combining the analytical capabilities of LLMs with techniques like Retrieval Augmented Generation (RAGs) to provide context-aware and project-specific security analysis [ 12 ] . RAGs enable Bugdar to access and utilize relevant project documentation, including code comments, design specifications, and security guidelines, enhancing its understanding of the codebase and improving the accuracy of its vulnerability assessments. Bugdar’s ”Specialization-as-a-Service” model further distinguishes it from existing approaches. This concept emphasizes Bugdar’s ability to adapt to the unique characteristics of each project, learning from project-specific data and developer feedback to provide tailored security analysis that aligns with the project’s specific context and requirements. III System Development Bugdar’s architecture is designed to integrate seamlessly into the GitHub pull request workflow, providing developers with timely feedback and actionable security insights. III-A System Architecture The architecture is illustrated in Figure 1 , which includes: • GitHub Integration Layer: Interfaces with GitHub’s API to monitor pull requests, retrieve code diffs, and post review comments. • Preprocessing Module: Processes code diffs to prepare input for the LLM, handling tasks such as code chunking and context window management. • Context Retrieval Engine: Utilizes RAGs to fetch relevant project documentation and historical code data. • LLM-Based Analysis Engine: Leverages fine-tunable LLMs (e.g., GPT-4o) to perform security analysis on the code changes. • Reporting Module: Generates structured vulnerability reports and code review comments based on the analysis. III-B Analysis Workflow The workflow follows the steps in Algorithm 1 . Bugdar’s AI-augmented approach aims to enhance secure code review workflow with the following principles: Algorithm 1 Bugdar Pull Request Analysis Workflow 0: New or updated pull request PR 1: Trigger Analysis upon detection of PR . 2: Fetch Code Diffs using the GitHub API. 3: Partition Code Diffs to fit LLM context window. 4: Initialize Analysis Report . 5: for each code chunk do 6: Analyze Chunk with LLM(s). 7: Select Best Analysis using a judge LLM. 8: Accumulate Results into the report. 9: end for 10: Aggregate Results into a comprehensive report. 11: Update Credits based on token usage. 12: Generate Reports and Notifications : • Store the analysis report in the database. • Post summary to the pull request (if enabled). • Send notifications (e.g., Slack) if configured. • Shifting security analysis earlier in the development cycle: Providing security feedback during the pull request stage enables developers to identify and address vulnerabilities before they are merged into the main codebase, reducing the cost and effort of remediation later in the development process. • Improving developer efficiency: Automating the analysis process and generating actionable feedback reduces the manual effort required for code review, allowing developers to focus on core development tasks. • Fostering a security-conscious development culture: By integrating security analysis seamlessly into the developer workflow, Bugdar encourages developers to