Skip to content

PRECEPT: Safe Self-Improvement of Coding Agents via Evolving PrinciplesPRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles

arXiv· arXiv:2611.33519· Keyan Guo, Rupam Patir, Haipeng Cai, Hongxin HuUniversity at BuffaloIndexed by this site · 3 days ago· Originally publishedDefenses· Its place in the scan record →

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryThe paper proposes PRECEPT, which lets coding agents learn from their own safety failures through a continuously evolving library of safety principles: the library starts from authoritative secure coding principles and is revised based on the agent's own failures, with revisions retained only when new executions show the code is safer and functional success rate stays within a small tolerance of the agent without the library. On 14 task sequences, Codex, Claude Code, and Qwen Code fixed the vulnerability 85.7% of the time when they saw the failing security test, but in a new session reintroduced the same type of vulnerability 26.7% of the time, similar to agents that had never encountered it (27.5%); recording the fix in persistent context or providing public secure coding principles did not close this gap. On task families unseen during evolution, PRECEPT's weakest agent achieved 97.1% safe usable code, higher than the strongest unassisted agent's 81.9% and the strongest baseline's 87.7%, and improvements continued with evolution steps rather than saturating after the first round.

Questions
After coding agents fix a vulnerability, they still reintroduce the same CWE in new sessions; the authors study how to make experience persist across sessions and generalize to new code without losing functional correctness.
Methods
PRECEPT starts from public security principles, goes through a TEST, ANALYZE, DRAFT, DECIDE loop, modifies the principle library with closed mutation primitives, and accepts revisions based solely on fresh paired executions and a functional lower bound.
Experiments and results
On unseen task families in SeCodePLT, the S|P of the three agents using the evolved library is 97.1%–98.5%; on subsequent tasks when the library is given, RR is 11.5%. There are transfer gains across agents and models, but on SusVibes the library brings no statistically significant gain.
Limitations and future work
The authors note that security determination depends on tests, the main results use only one evolution run per agent, and evolution cost is high; cross-benchmark gains are limited to the language used during learning, and repository-level experiments obtain no gains.

Related events and news

1 events · 0 news mentions

Related papers

Show 1 more papers
Read originalarxiv.org