AI 编程 4.0 · 优秀 2026-11-24 · 论文

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

CodexClaude CodeQwen Code 在 14 组任务序列中修复漏洞成功率达 85.7%,但新会话重新引入同类漏洞的概率为 26.7%,与从未见过的 agent(27.5%)相当能力在,留存不在写入持久上下文或提供公开安全编码原则都无法弥补:修复只绑定原任务家族,通用原则激活不到眼前代码PRECEPT 提出'安全自我改进':从权威安全编码原则出发用 agent 自身失败迭代修订的原则库,仅当新执行证明修订更安全且不损功能成功率时才保留未见任务家族上最弱 PRECEPT agent 达 97.1% 安全可用代码率,高于最强无辅助 agent 的 81.9%

打开原文回到归档

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

  • ID: 1ef4fc7c
  • 原文链接: https://arxiv.org/abs/2611.33519
  • PDF: https://arxiv.org/pdf/2611.33519
  • 作者: Keyan Guo, Rupam Patir, Haipeng Cai, Hongxin Hu
  • 日期: 2026-11-24
  • 更新: 2026-11-24
  • 分类: coding
  • 来源类型: paper
  • 标签: coding-agents, security, self-improvement, principles
  • 质量评分: 4/5
  • 抓取时间: 2026-11-29T04:20:30Z

中文导读

CodexClaude CodeQwen Code 在 14 组任务序列中修复漏洞成功率达 85.7%,但新会话重新引入同类漏洞的概率为 26.7%,与从未见过的 agent(27.5%)相当能力在,留存不在写入持久上下文或提供公开安全编码原则都无法弥补:修复只绑定原任务家族,通用原则激活不到眼前代码PRECEPT 提出'安全自我改进':从权威安全编码原则出发用 agent 自身失败迭代修订的原则库,仅当新执行证明修订更安全且不损功能成功率时才保留未见任务家族上最弱 PRECEPT agent 达 97.1% 安全可用代码率,高于最强无辅助 agent 的 81.9%

为什么值得关注

Agents fix vulnerabilities 85.7% of the time yet reintroduce them in new sessions 26.7%; PRECEPT's evolving principles break the cycle.

它指出 agent 修复漏洞后的「复犯」问题:新会话中 26.7% 会重新引入同类漏洞,与从未见过该漏洞的 agent(27.5%)相当;PRECEPT 用「只保留被新执行证明更安全且不损功能成功率的修订」这一准入标准实现安全自我改进,未见任务族上 97.1% 对 81.9% 的对比为原则库路线提供了证据。

关键信息

  • 论文标题: PRECEPT: Security Self-Improvement of Coding Agents via Evolving Principles
  • 作者: Keyan Guo, Rupam Patir, Haipeng Cai, Hongxin Hu
  • arXiv: https://arxiv.org/abs/2611.33519
  • PDF: https://arxiv.org/pdf/2611.33519
  • 发布时间: 2026-11-24
  • arXiv 分类: cs.CR, cs.AI
  • 关联标签: coding-agents, security, self-improvement, principles

English Abstract

AI coding agents increasingly write and submit code with limited human review, and much of it passes functional tests while remaining insecure. We show that these failures persist. Across 14 task sequences, Codex, Claude Code, and Qwen Code fixed a vulnerability 85.7% of the time when shown the failing security test, then reintroduced the same vulnerability class in a new session 26.7% of the time, about as often as agents that had never seen it (27.5%). The capability is present; the retention is not. Neither recording the repair in the agent's persistent context nor supplying published secure coding principles closed the gap: the recorded fix stayed tied to the family of the task it came from, and the principles, written for human developers, remained too general to apply to the code at hand. The knowledge exists; it is not activated. We call the missing ability security self-improvement: an agent learns from its own security failures so that each lesson persists across sessions, applies to new code, and does not break what works. We present PRECEPT, which equips coding agents with this ability through an evolving library that starts from authoritative secure coding principles and revises them against the agent's own failures, so that each principle comes to fire on the code where that agent actually goes wrong. A revision is kept only if fresh executions show it makes code more secure while keeping functional success within a small tolerance of the agent without the library. Improvement continues across evolution steps rather than saturating after the first. On task families never seen during evolution, PRECEPT's weakest agent reaches 97.1% secure working code, above the strongest unaided agent at 81.9% and the strongest baseline at 87.7%.

English Summary

Across 14 task sequences with Codex, Claude Code, and Qwen Code, agents fixed a vulnerability 85.7% of the time when shown the failing security test, then reintroduced that class in a new session 26.7% of the time about as often as agents that had never seen it (27.5%). Neither recording the repair in persistent context nor published secure-coding principles closed the gap: recorded fixes stayed tied to the original task family and generic principles failed to activate on the code. The paper names this missing ability security self-improvement and presents PRECEPT: an evolving library of secure-coding principles revised against the agent's own failures, keeping a revision only when fresh executions show it makes code more secure. On unseen task families, the weakest PRECEPT-equipped agent reaches 97.1% secure working code versus 81.9% for the strongest unaided agent.

Obsidian Notes

  • 内容获取路径:本次运行 opencli arxiv paper <arxiv_id> -f json 一次成功,页面由 arXiv 元数据与摘要回填。
  • 中文导读与价值判断均锚定在条目已有摘要、论文摘要、作者、日期与分类信息上;未添加论文摘要之外的实验细节。
  • 现代站点生成器按 content/{entry.id}.md 查找内容页;本文件写入 canonical content 目录,而不是 openclaw/content/。