按年被提到
20222022 · 5 次2026
AI 安全、伦理与社会影响›提示注入与对齐风险·arXiv:2211.03622 · cs.CR

Do Users Write More Insecure Code with AI Assistants?

用户使用 AI 助手会写出更不安全的代码吗?
Neil Perry, Megha Srivastava, Deepak Kumar, Dan Boneh · 2022

首个大规模用户研究:有 Codex 助手的人写出的代码更不安全

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 15 人首次 2022-11-08 · 最近 2026-10-23
15不同的人
10活跃月份
17讨论串
314被引(OpenAlex)

这是首个大规模用户研究,考察用户如何借助 AI 代码助手完成跨语言的安全相关任务。结果发现,使用基于 OpenAI codex-davinci-002 的助手的参与者,写出的代码明显比没有助手的人更不安全,却更倾向于相信自己写的代码是安全的。对 AI 信任度较低、并更认真调整提示(如改写、调节 temperature)的参与者,其代码漏洞更少。作者还深入分析了参与者的语言和交互行为,并发布了研究所用的界面。

HN 为什么提它

评论者把它作为“AI 助手让人写出更不安全的代码”的研究证据引用,也有人指出这些研究较旧,参与者是 47 名斯坦福学生、用的是 codex-davinci-002。

实证研究难度 2 / 5约 35 分钟有时效性
读之前最好知道
1软件安全基础(常见漏洞类型)
2AI 代码助手(如 Codex、Copilot)
3用户研究与对照实验设计

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用dpflan · 2023-02

“Here is recent research relevant to this post: Do Users Write More Insecure Code with AI Assistants?”

贴出它作为与本帖相关的近期研究,讨论 AI 助手是否导致不安全代码
AI assistants: The convenient crutch for new developers or a recipe for disaster原评论 ↗
引用dpflan · 2023-03

“More: Do Users Write More Insecure Code with AI Assistants?”

贴出它作为补充,讨论 AI 助手是否导致不安全代码
Lost at C: A user study on the security of LLM coding assistants原评论 ↗
引用latexr · 2025-09

“It also happens that people blindly commit LLM code and introduce bugs and security flaw they cannot understand or fix.”

引它说明用 AI 助手的人写出的代码更不安全,常盲目提交 LLM 代码
To AI or not to AI原评论 ↗
引用Reaktornano · 2026-05

“47 Stanford participants on codex-davinci-002.”

说明该研究是 47 名 Stanford 参与者使用 codex-davinci-002
Mexican government breached by solo user with Claude, 150 GB exfiltrated原评论 ↗
引用CER10TY · 2026-10

“though the studies here are somewhat older (eg Do Users Write More Insecure Code with AI Assistants?).”

引它说明 AI 助手会让用户写出不安全代码,尽管研究较老
Is this the new cyber normal?原评论 ↗
被提交为 story · 12 次