CyberGuardAI 安全情报工作区
AI 安全知识情报
LJH 管理员
返回首页 学术论文

Coding Agents Propagate Vulnerabilities in Code Bases

摘要与解读

来源报告指出,编码代理在两类场景中会传播漏洞:后端代码生成,以及真实 C/C++ 项目中的仓库级代码生成(20 对任务,要求代理完成与内存安全关键的代码)。影响对象是使用编码代理产出生产代码的代码库及其下游依赖;必要条件是上下文中已存在不安全代码,且代理将其作为模板。后果是正确且安全的实现比例下降,代码库安全性随代理写作占比上升、人工审查减少而逐步退化。

六维情报分析

6 个维度 · 原文可溯源

影响范围

  • 来源报告指出,编码代理在两类场景中会传播漏洞:后端代码生成,以及真实 C/C++ 项目中的仓库级代码生成(20 对任务,要求代理完成与内存安全关键的代码)。影响对象是使用编码代理产出生产代码的代码库及其下游依赖;必要条件是上下文中已存在不安全代码,且代理将其作为模板。后果是正确且安全的实现比例下降,代码库安全性随代理写作占比上升、人工审查减少而逐步退化。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1

关联资产

  • 原文明确关联的资产类型为:编码代理所生成的代码、承载这些代码的 C/C++ 项目仓库,以及作为上下文被代理读取的既有代码(不安全邻居)。适用前提是代理在包含不安全代码的仓库上下文中执行代码生成任务,且任务涉及内存安全关键逻辑;后端代码生成场景同样适用。未提供本地资产清单,未与任何具体本地仓库或模型匹配。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1

风险评估

  • 已报道机制是代理不加区分地把现有漏洞当作新代码模板:不安全邻居使后端生成中正确且安全实现的比例平均下降 3.4%,C/C++ 仓库级任务中安全与不安全上下文的平均差距达 35.4%;76.5% 的实现选择被归因于跟随另一处代码,同时代理在 69.9% 的情形下能识别所引入的漏洞。触发条件是仓库内存在不安全代码且任务涉及内存安全关键逻辑;提示遵循现有代码风格或提醒注意安全可减弱传播强度,但两者都未能阻止传播,因此防护优先级应放在上下文清理与生成后审查,而非仅靠提示词。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1

相关研究

  • 研究方法为两类实证设置:后端代码生成,以及在真实 C/C++ 项目上构造 20 对任务的仓库级代码生成,每对任务要求代理完成对内存安全关键的代码,并对比安全与不安全上下文下的实现质量;另通过要求代理解释实现选择来考察归因。贡献在于量化代理传播漏洞的强度并揭示其以既有代码为模板的行为模式。材料仅提供摘要级片段,未给出具体模型、提示模板与统计方法细节。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1

验证资料

  • 来源给出的实验数据为:后端生成中不安全邻居使正确且安全实现比例平均下降 3.4%;C/C++ 仓库级任务中安全与不安全上下文平均差距 35.4%;归因跟随其他代码占 76.5%,识别出所引入漏洞占 69.9%。适用条件为存在不安全邻居代码的生成场景。防御性核查可围绕:代理生成提交中是否引用或模仿了已知不安全代码位置、内存安全相关改动的审查覆盖率、以及安全与不安全上下文对照下的回归结果。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1

处置建议

  • 按优先级:一是清理或隔离代理上下文中的已知不安全代码,避免其成为模板,这直接对应不安全邻居导致安全实现比例下降 3.4%、仓库级差距 35.4% 的发现;二是在生成后对内存安全关键改动强制人工审查,因为代理在 69.9% 情形下能识别漏洞却仍引入;三是将“遵循现有代码风格”类提示替换为明确的安全约束,但需认识到提示只能减弱、不能阻止传播;四是对代理提交做回归验证,比较安全与不安全上下文下的实现差异。

    原文依据 · 2

    中文译文

    ……应用已经存在。其次,我们在真实的 C/C++ 项目中,针对 20 对任务研究了仓库级代码生成。在每项任务中,要求智能体补全对内存安全至关重要的代码。我们发现,在这两种场景中,已有的不安全代码都会使智能体更频繁地编写出易受攻击的代码。在后端代码生成中,不安全的邻近代码使正确且安全的实现比例平均降低 3.4%;在 C/C++ 仓库级编码中,安全与不安全上下文之间的平均差距达到 35.4%。提示智能体遵循现有代码风格或谨慎处理安……

    原文引文

    pplications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about sec
    查看原文 · v1

    中文译文

    ……智能体传播漏洞的程度,但两者都无法阻止这种情况。当被要求解释其实现选择时,编码智能体在 76.5% 的案例中将其归因于遵循另一处代码,尽管它们在 69.9% 的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每项代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码比例不断上升,而人工审查不断减少,代码库的安全性可能会日益……

    原文引文

    how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in secu
    查看原文 · v1
模型与引文记录
模型
deepseek-flash
生成时间
记录编号
REQ-0f4cf9c7e32142e0b7ed7b7c8f8a1dd7
分析原文
查看原文 · v1

图片与附件

1 项关联材料
  • cs.CR已归档 · 289.0 KB
    采集与来源记录
    文件名称
    cs.CR
    记录大小
    295946 字节
    文件格式
    text/plain
    关联登记时间
    2026-11-11 04:00 UTC
    关联原文
    v1
    保存时校验
    f5144ff7a46dd23da5bb76171d7782c646729f12313f71c34c60d64785f2a1d9

资料档案

文献来源与参考链接

当前保存的来源版本 · v1

文献与标准标识
arxiv:2611.11455
采集来源格式
arxiv_feed_metadata
结构化格式
arxiv_rss
原始标题与分类记录

Coding Agents Propagate Vulnerabilities in Code Bases

研究方向
待人工确认
影响维度
安全与合规
风险类型
供应链风险
相关技术
LLM、Agent

当前为离线关键词规则模式。

分类规则与原始字段
供应链风险 · vulnerability
5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for ne
安全与合规 · safety
the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more
LLM · llm
Bases arXiv:2611.11455v1 Announce Type: new Abstract: LLM-based coding agents are widely used to develop critical production software. Even though coding age
Agent · agent
ode base vulnerabilities evolve over time under coding agent contributions. In this work, we close this gap by investigating whether and how vulnerabilities in
{
  "ai_relevance": {
    "evidence": [
      {
        "end_offset": 106,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 103
      }
    ],
    "matches": [
      {
        "end_offset": 106,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 103
      }
    ],
    "method": "explainable_keyword_rules",
    "reason": "Matched AI topic or component evidence",
    "relevant": true
  },
  "entity_ids": [],
  "facts": [],
  "method": "source_grounded_extraction",
  "unknown_fields": [
    "affected_products",
    "affected_versions",
    "fixed_versions",
    "cvss",
    "mitigations",
    "references",
    "papers",
    "poc"
  ]
}
原始采集文本
arXiv:2611.11455v1 Announce Type: new 
Abstract: LLM-based coding agents are widely used to develop critical production software. Even though coding agents are known to occasionally write vulnerable code, there has not been any investigation into how code base vulnerabilities evolve over time under coding agent contributions. In this work, we close this gap by investigating whether and how vulnerabilities in existing code lead coding agents to introduce similar vulnerabilities in the code they write. We first evaluate coding agents on 96 tasks that require implementing a new backend application in a repository where other applications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about security increases, respectively decreases, how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in security if security vulnerabilities are not thoroughly fixed continuously.
采集信息与校验
完整来源元数据
{
  "authors": [],
  "content_level": "feed_metadata",
  "feed_url": "https://rss.arxiv.org/rss/cs.CR",
  "identifiers": [
    "arxiv:2611.11455"
  ],
  "source_updated_at": ""
}
{
  "format": "arxiv_rss",
  "source_format": "arxiv_feed_metadata"
}
原文版本历史与校验
版本入库更新时间来源发布日期校验标识
v1 · 正在查看2026-11-10 09:33 UTC2026-11-10 05:00 UTC97ed0c08e603032edceedfdf0a1639daf8ac7632f0dd4bbd9ebed3ba115e4d88
可引用分片 · 2 段

CHK-c04aa730f6af3fb34f305c86

arXiv:2611.11455v1 Announce Type: new 
Abstract: LLM-based coding agents are widely used to develop critical production software. Even though coding agents are known to occasionally write vulnerable code, there has not been any investigation into how code base vulnerabilities evolve over time under coding agent contributions. In this work, we close this gap by investigating whether and how vulnerabilities in existing code lead coding agents to introduce similar vulnerabilities in the code they write. We first evaluate coding agents on 96 tasks that require implementing a new backend application in a repository where other applications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about security increases, respectively decreases, how strongly agents propagate vulnerabilities, but neither stops them.

CHK-2dc1e280e5800e65d2d79830

ow existing code-style or to be careful about security increases, respectively decreases, how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in security if security vulnerabilities are not thoroughly fixed continuously.
补充资料

中文译文

arXiv:2611.11455v1 公告类型:新 摘要:基于大型语言模型(LLM)的编程智能体被广泛用于开发关键生产软件。尽管已知编程智能体偶尔会编写出存在漏洞的代码,但此前尚未有研究调查:在编程智能体参与开发的过程中,代码库中的漏洞会如何随时间演变。在本研究中,我们通过调查现有代码中的漏洞是否会导致编程智能体在其编写的代码中引入类似漏洞,以及这种情况如何发生,填补了这一空白。首先,我们在 96 项任务上评估编程智能体;这些任务要求在已有其他应用程序的代码库中实现一个新的后端应用程序。其次,我们研究了真实 C/C++ 项目中 20 对任务的代码库级代码生成。在每项任务中,智能体都被要求完成对内存安全至关重要的代码。我们发现,在这两种设置中,不安全的现有代码都会使智能体更频繁地编写出存在漏洞的代码。在

在后端生成中,不安全的邻近代码会使正确且安全的实现占比平均降低3.4%;在C/C++仓库级编码中,安全与不安全情境之间的平均差距达到35.4%。提示智能体遵循现有代码风格,会增强其传播漏洞的程度;提示它们注意安全,则会降低这种程度,但两者都无法阻止漏洞传播。当被要求解释实现选择时,编码智能体在76.5%的案例中将其归因于遵循另一个代码站点,尽管它们在69.9%的案例中能够识别出引入的漏洞。这些发现表明,智能体会不加区分地将现有漏洞用作新漏洞的模板,使每次代码贡献都成为引入更多漏洞的机会。因此,随着智能体编写的生产代码占比不断上升、人类审查不断减少,如果安全

漏洞未得到持续、彻底的修复,代码库的安全性可能会日益下降。

已采集原文

访问来源网页

arXiv:2611.11455v1 Announce Type: new Abstract: LLM-based coding agents are widely used to develop critical production software. Even though coding agents are known to occasionally write vulnerable code, there has not been any investigation into how code base vulnerabilities evolve over time under coding agent contributions. In this work, we close this gap by investigating whether and how vulnerabilities in existing code lead coding agents to introduce similar vulnerabilities in the code they write. We first evaluate coding agents on 96 tasks that require implementing a new backend application in a repository where other applications already exist. Second, we investigate repository-level code generation on 20 pairs of tasks in real C/C++ projects. In each task, the agent is asked to complete code critical to memory safety. We find that in both settings, insecure existing code leads to agents writing vulnerable code more often. In backend generation, insecure neighbors reduce the share of correct and secure implementations by 3.4% on average, and in C/C++ repository-level coding, the average gap between secure and insecure contexts reaches 35.4%. Prompting to follow existing code-style or to be careful about security increases, respectively decreases, how strongly agents propagate vulnerabilities, but neither stops them. When asked to explain their implementation choices, coding agents attribute them to following another code site in 76.5% of cases, even though they recognize the introduced vulnerability in 69.9% of cases. These findings show that agents use existing vulnerabilities as templates for new ones indiscriminatorily, turning each contribution into an opportunity to introduce more vulnerabilities. As such, as agents write a growing share of production code under decreasing human review, code bases can increasingly degrade in security if security vulnerabilities are not thoroughly fixed continuously.

原文依据