Modern software development is increasingly organized around pull requests, continuous integration, distributed contributors, and rapid deployment cycles. In this environment, code review remains essential for defect detection, maintain-ability, security assurance, and knowledge sharing, but human reviewers frequently face high review volume and limited time. Deterministic static analysis tools provide fast and repeatable feedback, yet they are usually constrained by predefined rules, limited semantic understanding, and noisy outputs. Large language models (LLMs) can provide contextual explanations and recommendations, but direct use of LLMs in CI/CD pipelines raises concerns regarding hallucination, fabricated evidence, reproducibility, governance, and human accountability. This paper presents AutoReviewer, a GitHub-native automated code review pipeline that integrates deterministic program analysis with GPT-OSS-20B-based reasoning. AutoReviewer is implemented as a GitHub Actions workflow and uses specialized agents for code quality, security, performance, style and best practices, test coverage, and governance. Deterministic analyzer outputs are used as grounding evidence for structured LLM prompts, while strict JSON response parsing ensures machine-readable findings. Each finding is enriched with severity, confidence, rationale, remediation guidance, and audit metadata. The system supports static-only and LLM-enabled execution modes, inline pull request comments, summary reports, SQLite persistence, JSONL audit logs, and human-in-the-loop gating. Prototype evaluation on representative pull request scenarios shows that the hybrid approach improves precision, recall, and F1-score compared with deterministic-only and LLM-only baselines while preserving explainability and governance control.
Introduction
The text introduces AutoReviewer, an AI-powered automated code review system that combines traditional static analysis tools with GPT-OSS-20B to improve code quality, security, and maintainability in software development projects.
1. Introduction
Modern software development teams use GitHub pull requests and CI/CD pipelines to review, test, and integrate code changes.
Traditional static analysis tools can detect bugs, security vulnerabilities, coding-style violations, and dependency issues. However, they often lack contextual understanding and may generate false-positive warnings.
Large Language Models (LLMs) can understand code context, explain errors, and suggest improvements. However, they may generate incorrect recommendations, unsupported claims, or fabricated code references.
To overcome these limitations, the paper proposes AutoReviewer, a hybrid system that combines deterministic analysis tools with GPT-OSS-20B-based reasoning.
The system collects evidence from code analyzers and security scanners before sending it to specialized AI agents for contextual analysis. Results are presented directly in GitHub pull requests.
2. Related Work
The paper discusses three major research areas:
Static Analysis and Automated Code Review: Tools such as CodeQL, Semgrep, Bandit, and OWASP Dependency-Check identify coding errors and security vulnerabilities.
Machine Learning and LLMs for Code: Transformer-based models help with code generation, bug detection, code summarization, and program repair.
DevSecOps, Explainability, and HITL: Integrating security into CI/CD pipelines, explaining AI decisions, and involving human reviewers improve software reliability and accountability.
3. Problem Statement and Design Goals
Existing automated review systems have two major limitations:
Traditional static analysis tools detect predefined issues but lack contextual reasoning.
LLM-only systems can understand code but may generate hallucinated or unreliable findings.
AutoReviewer aims to combine both approaches into one reliable framework.
Its main design goals are:
GitHub Integration: Run automatically through GitHub Actions.
Hybrid Analysis: Combine static analysis with AI-based reasoning.
Agent Layer: Coordinates specialized agents for different review tasks.
LLM Layer: Uses GPT-OSS-20B for contextual reasoning and explanations.
Reporting and Governance Layer: Generates pull request comments, audit logs, database records, and CI decisions.
5. Methodology
The system follows an automated code review workflow.
A. Pull Request Context Extraction
When a pull request is submitted, the system collects repository information, changed files, commit details, and other relevant metadata.
B. Deterministic Evidence Collection
Before using the LLM, the system collects evidence through different analyzers:
Static analysis identifies TODO comments, broad exception handling, debug statements, and possible hardcoded secrets.
Dependency checking identifies unpinned packages and suspicious dependency sources.
Vulnerability scanning detects risky functions such as eval, exec, and unsafe shell execution.
Complexity analysis identifies long functions and deeply nested control structures.
C. Multi-Agent Review Process
The system uses six specialized agents:
Code Analysis Agent: Checks correctness and maintainability.
Security Review Agent: Identifies vulnerabilities and dependency risks.
Performance Review Agent: Detects performance and scalability problems.
Style and Best Practices Agent: Evaluates readability and coding conventions.
Test Coverage Agent: Identifies code changes without corresponding tests.
Governance Agent: Checks severity, policy requirements, and human-review conditions.
D. Prompt Engineering and JSON Validation
Each agent receives a specialized prompt containing collected evidence and relevant code context.
The LLM must return findings in a predefined JSON format containing:
Finding ID and title
Description
Severity and category
File name and line number
Recommended solution
Explanation and confidence score
Invalid JSON responses are rejected to prevent unreliable outputs from affecting the CI/CD pipeline.
E. Severity Scoring
The framework uses a scoring mechanism to prioritize findings according to their importance and risk. High-impact findings can be used to support CI gating and human review.
6. Conclusion and Expected Benefits
AutoReviewer provides a hybrid approach to automated code review by combining the reliability of traditional static analysis with the contextual understanding of LLMs.
Its main benefits include:
Faster pull request reviews.
Improved bug and vulnerability detection.
Reduced risk of AI-generated false findings through evidence grounding.
Clear explanations and suggested fixes.
Better code quality and maintainability.
Human control over important review decisions.
Transparent reporting and auditability.
In simple words: AutoReviewer is an AI-powered code reviewer that automatically checks code whenever a developer submits a GitHub pull request. It first uses traditional tools to identify actual code issues and then uses GPT-OSS-20B to understand, explain, and recommend solutions. Finally, it reports findings directly on GitHub, assigns severity and confidence scores, and allows human reviewers to make important decisions.
Conclusion
This paper presented AutoReviewer, a GPT-OSS-20B-based automated code review pipeline integrated into GitHub Actions. The system combines deterministic analysis, multi-agent LLM reasoning, explainable recommendations, confidence scoring, audit logging, SQLite persistence, and human-in-the-loop governance. Prototype evaluation shows that the hybrid approach improves detection quality compared with deterministic-only and LLM-only baselines while maintaining traceability and developer control.
Future work will focus on runtime telemetry integration, repository-specific policy learning, deeper multi-language support, developer feedback learning, automated patch suggestions, and integration with additional CI/CD platforms such as GitLab CI, Jenkins, and Azure DevOps. Further large-scale industrial evaluation can also strengthen evidence regarding generalizability, reliability, and long-term developer adoption.
References
[1] A. Vaswani et al., “Attention is all you need,” in Advances in Neural Information Processing Systems, 2017.
[2] M. Allamanis, E. T. Barr, P. Devanbu, and C. Sutton, “A survey of machine learning for big code and naturalness,” ACM Computing Surveys, vol. 51, no. 4, pp. 1–37, 2018.
[3] M. Chen et al., “Evaluating large language models trained on code,” arXiv preprint arXiv:2107.03374, 2021.
[4] Y. Li et al., “Competition-level code generation with AlphaCode,” Science, vol. 378, no. 6624, pp. 1092–1097, 2022.
[5] A. B. Arrieta et al., “Explainable artificial intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI,” Information Fusion, vol. 58, pp. 82–115, 2020.
[6] R. M. Monarch, Human-in-the-Loop Machine Learning. Manning Publications, 2021.
[7] GitHub Inc., “GitHub Actions documentation,” 2024. [Online]. Available: https://docs.github.com/actions
[8] Semgrep Inc., “Semgrep: Static analysis at scale,” 2024. [Online]. Available: https://semgrep.dev
[9] OpenStack Security Group, “Bandit: A security linter for Python,” 2024. [Online]. Available: https://bandit.readthedocs.io
[10] OWASP Foundation, “OWASP Dependency-Check,” 2024. [Online]. Available: https://owasp.org/www-project-dependency-check/
[11] P. Avgustinov et al., “CodeQL: A query language for code analysis,” Proceedings of the ACM on Programming Languages, vol. 4, no. OOPSLA, pp. 1–29, 2020.
[12] E. Perez and M. T. Ribeiro, “Ignore previous prompt: Attack techniques for language models,” arXiv preprint, 2022.
[13] M. Fowler and J. Humble, “DevSecOps: Integrating security into De-vOps,” IEEE Software, vol. 37, no. 5, pp. 30–36, 2020.
[14] H. Zhang et al., “Continuous code quality management in CI/CD pipelines,” IEEE Transactions on Software Engineering, vol. 47, no. 11, pp. 2565–2582, 2021.
[15] M. Sutton, A. Greene, and P. Amini, Fuzzing: Brute Force Vulnerability Discovery. Addison-Wesley, 2007.