Reasoning and Auto Red-Teaming for Safer Code Generation

Abstract

Large Language Models (LLMs) and Coding Agents are widely adopted for software development by companies and individual developers today. However, most coding agents prioritize generating functionally correct code while code security is either not their training objective or only a secondary one. This raises major concerns as security vulnerabilities in AI-generated code are making their way into popular open-source projects and key production systems. In this talk, we want to share our recent progress in training open-source coding agents with built-in security reasoning capabilities for safe code generation. I will start by introducing a novel harness design that integrates code generation and security review. By translating security feedback into repository-grounded security obligations, it enables context-preserving vulnerability repair. In addition, to robustify coding agents against malicious inputs, I will discuss a multi-agent red-teaming framework where attack agents dynamically interact with the coding agent over multiple turns to induce vulnerabilities into the target codebase. I will show how we use this framework to synthesize “hard cases” to improve agent training. Finally, I will discuss open challenges in securing other steps of agentic-based software development and new directions for monitoring and safeguarding agent use.

Bio

Gang Wang is an Associate Professor in the Siebel School of Computing and Data Science at the University of Illinois Urbana-Champaign. His research interests are Security and Privacy, Internet Measurement, and Machine Learning. His recent work aims to develop explainable and robust AI systems to protect networked and computer systems and augment humans’ ability to perform security tasks (e.g., vulnerability analysis, network threat response). He is a recipient of the UIUC GCOE Dean’s Award for Excellence in Research (2026), NSF CAREER Award (2018), Amazon Research Award (2021), Google Faculty Research Award (2017), and Best Paper awards at IMWUT (2019), ACM CCS (2018), and SIGMETRICS (2013). He is a core member of the NSF AI Institute for Agent-based Cyber Threat Intelligence and Operation (ACTION) and the Expedition Project for Learning Directed Operating System (LDOS). He co-led a team of UIUC students to compete in the Amazon Nova AI Challenge (2025), winning 1st place as a model developer team.