PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles
summary
The gist
AI coding agents increasingly write and submit code with limited human review, and much of it passes functional tests while remaining insecure.<ref:2611.33519#pg1,much of it passes functional tests…
In short
The study addresses how AI coding agents fail to retain security lessons across different tasks. It introduces 'security self-improvement,' a learning procedure where agents use their own security failures to update principles, making lessons persistent and applicable to new code. The PRECEPT framework implements this by evolving a library of secure coding principles through an iterative TEST, ANALYZE, DRAFT, DECIDE loop.
Key concepts
- Security Self-Improvement
- This is the ability of an AI agent to learn from its own security mistakes. When an agent makes a mistake and a fix is applied, this learning procedure ensures that the lesson remains in its memory. This allows the agent to apply that specific lesson consistently across future coding sessions and new projects without forgetting what worked.
- Vulnerability Recurrence
- This refers to the failure of an agent to retain security knowledge. The study found that when a fix was applied, recurrence on a slightly different task dropped significantly, proving that simple context retention is not enough. True security self-improvement must ensure lessons persist even when the code changes.
- PRECEPT Framework
- PRECEPT is the system designed to give agents security self-improvement. It uses an evolving library of secure coding principles that are constantly revised based on the agent's own failures. This evolution happens through a cycle involving testing, analyzing, drafting solutions, and deciding whether to keep a revision.
- Evolving Principles
- This is the core mechanism of PRECEPT. Instead of using static security rules, the framework maintains a library of principles that are updated dynamically. These principles are revised when an agent fails on a task, ensuring that the knowledge base gets smarter and more resilient over time.
Terminology used across episodes
This episode discusses
- PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles · Paper Radio
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
- Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks · Paper Radio
- Constrained Decoding for Secure Code Generation
- Fortifying LLM-Based Code Generation with Graph-Based Reasoning on Secure Coding Practices
- SkillOpt: Executive Strategy for Self-Evolving Agent Skills
- Self-Evolving Coding Rules for AI Coding Agents · Paper Radio
- Self-Taught Optimizer (STOP): Recursively Self-Improving Code Generation
- CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation
- Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations
- SelfOp: An Optimization Algorithm for Self-Improving Security Agents · Paper Radio
- BaxBench: Can LLMs Generate Correct and Secure Backends?
- When "Correct" Is Not Safe: Can We Trust Functionally Correct Patches Generated by Code Agents?
- HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Data
- ProSec: Fortifying Code LLMs with Proactive Security Alignment
- Secure Code Generation at Scale with Reflexion
- AutoSafeCoder: A Multi-Agent Framework for Securing LLM Code Generation through Static Analysis and Fuzz Testing
- SCGAgent: Recreating the Benefits of Reasoning Models for Secure Code Generation with Agentic Workflows
- Learning from Repair Experience: Self-Evolving Agents for Automated Vulnerability Repair · Paper Radio
- Formal Policy Enforcement for Agentic Systems · Paper Radio
- Contextual Agent Security: A Policy for Every Purpose
The paper
PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles · Read on arXiv
University at Buffalo
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: I'm Nadia.
Elias: And I'm Elias, here with Priya.
Nadia: We're looking at the paper: "PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles".
Paper summary: Nadia: We’ve just been talking about how AI agents struggle to keep security fixes when they switch tasks, and the paper PRECEPT is trying to fix that by defining and implementing security self-improvement >
Elias: The main thesis is that we need an analogous ability for coding agents—the ability to learn from their own failures so those lessons stick across sessions and apply them everywhere >
Priya: So instead of just giving them a static set of rules, the paper proposes a learning procedure where the agent actively revises its knowledge based on what it breaks >
Nadia: It formalizes this with Definition one which outlines four conditions that a learning procedure needs to have to give an agent security self-improvement >
Elias: These four conditions are what define what we're looking for in a good learning procedure, focusing on how the agent learns from those failures >
Priya: They look at whether the lesson persists across sessions, whether it applies to new code, and crucially, if it manages to not break what already works >
Nadia: The authors test this by observing whether agents avoid vulnerabilities of the same type on later tasks when they use these evolved remedies compared to just using the original principles or no remedies at all >
Elias: They are asking themselves if recurrence is a failure of capability or just a failure of retention, which is a key research question they address >
Nadia: It’s about whether the knowledge exists in the system but isn't actually activated in practice when things get tricky or new >
Priya: This moves beyond just training the model or steering its decoding, it focuses on an internal mechanism for security knowledge that changes with what the agent gets wrong >
Elias: So, PRECEPT uses this idea of evolving principles to equip agents with that self-improvement ability through a structured loop of test analyze draft and decide >
Nadia: It’s a system where the agent tries a fix, tests it, analyzes why it failed for security reasons, drafts an improvement, and then decides whether to keep that revision or discard it >
Priya: And the decision to keep something is tied to functional code staying above a fixed floor while also showing that the fix actually helps >
Elias: So essentially they are building a feedback loop where security failures drive the refinement of the rules or principles themselves, rather than just relying on a single set of instructions >
Nadia: It really frames it as an internal mechanism for learning security, not just an external patch you apply to the model's training data >
Conclusion: Nadia: So to wrap up PRECEPT we’ve looked at how this framework aims to give coding agents a way to learn from their own security mistakes so that those lessons last >
Elias: The authors are showing that when you implement this security self-improvement, the agents show measurable improvements in code being both functional and secure compared to just using the original principles >
Priya: They’re demonstrating that this active learning procedure, where the agent revises its own knowledge based on failure and success, yields better results than what's possible with just persistent context or just a fixed set of published rules >
Nadia: The implications here are that we might need to design these agents not just as static tools but as systems capable of self-correction in security terms >
Elias: It’s about moving toward a system where the knowledge exists and is activated in a way that adapts to the specific code it's working on, which is what this paper calls security self-improvement >
Priya: But we have to remember the limitations they pointed out, like how security is judged by tests that only check for anticipated vulnerabilities >
Nadia: And then there’s the cost of evolution itself, since running these experiments requires executing main runs between thirty-five thousand six hundred and forty thousand times >
Elias: So it proves the capability is present but shows that retention isn't automatic, and we need this self-improvement mechanism to make it stick across different tasks >
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04