AI Code Gets a Safety Team to Block Hackers
AI-written software can leak your data; this fixes that.
AI programs have gotten very good at writing computer code. But they often make security mistakes that hackers can exploit. Think of it like a brilliant writer who forgets to lock the doors. Researchers at Seoul National University created MACGen, a system that uses a team of AI agents to solve this problem.
Instead of one AI writing code alone, MACGen works like a small company. A planner breaks down what the code should do. A security advisor looks for common vulnerabilities and gives specific advice. A coder writes the actual code, and a reviewer checks it with fresh eyes. Crucially, each agent only sees the important notes from the previous step — not a messy group chat. This keeps everyone focused and prevents confusion.
The results are promising. On two standard coding tests, MACGen improved both security and correctness by about 20 and 11 percentage points compared to asking an AI directly. That's like going from a C grade to a B+ or better. The catch is that MACGen is still in the research phase, and no AI can guarantee perfect security. But as software eats the world, this kind of multi-agent teamwork could become the new standard.
What does this mean for you? Every app, website, and smart device runs on code. When that code has security holes, your personal data is at risk. Making AI-generated code safer means fewer data breaches, fewer hacks, and less worry for everyone.
- MACGen uses a team of AI agents — planner, security advisor, coder, and reviewer — instead of one AI writing code alone.
- On two standard tests, it reduced security flaws by up to 19.61 percentage points compared to direct AI prompting.
- The system passes only structured notes between agents, which keeps roles clear and avoids the confusion of shared chat histories.
Why It Matters
Safer AI-generated software means fewer data breaches and less risk for everyone using apps, websites, and smart devices.