With their increasing capabilities, Large Language Models (LLMs) are now used across many industries. They have become useful tools for software engineers and support a wide range of development tasks. As LLMs are increasingly used in software development workflows, a critical question arises: are LLMs good at software security? At the same time, organizations worldwide invest heavily in cybersecurity to reduce exposure to disruptive attacks. The integration of LLMs into software engineering workflows may introduce new vulnerabilities and weaken existing security efforts. We introduce TOSSS (Two-Option Secure Snippet Selection), a benchmark that measures the ability of LLMs to choose between secure and vulnerable code snippets. Existing security benchmarks for LLMs cover only a limited range of vulnerabilities. In contrast, TOSSS relies on the CVE database and provides an extensible framework that can integrate newly disclosed vulnerabilities over time. Our benchmark gives each model a security score between 0 and 1 based on its behavior; a score of 1 indicates that the model always selects the secure snippet, while a score of 0 indicates that it always selects the vulnerable one. We evaluate 14 widely used open-source and closed-source models on C/C++ and Java code and observe scores ranging from 0.48 to 0.89. LLM providers already publish many benchmark scores for their models, and TOSSS could become a complementary security-focused score to include in these reports.


翻译:随着其能力的不断提升,大型语言模型(LLMs)现已在众多行业中得到应用。它们已成为软件工程师的有用工具,并支持广泛的开发任务。随着LLMs在软件开发工作流中的使用日益增多,一个关键问题随之产生:LLMs是否擅长软件安全?与此同时,全球各组织在网络安全领域投入巨资以减少遭受破坏性攻击的风险。将LLMs集成到软件工程工作流中可能会引入新的漏洞并削弱现有的安全防护。我们提出了TOSSS(双选项安全代码片段选择),这是一个用于衡量LLM在安全代码片段与易受攻击代码片段之间做出选择的能力的基准测试。现有的LLM安全基准测试仅涵盖有限范围的漏洞。相比之下,TOSSS基于CVE数据库,并提供了一个可扩展的框架,能够随时间整合新披露的漏洞。我们的基准测试根据模型的行为为其给出一个介于0到1之间的安全分数;得分为1表示模型总是选择安全代码片段,而得分为0表示它总是选择易受攻击的代码片段。我们在C/C++和Java代码上评估了14个广泛使用的开源和闭源模型,观察到的分数范围从0.48到0.89。LLM提供商已为其模型发布了许多基准测试分数,TOSSS有望成为这些报告中一个补充性的、专注于安全的评分指标。

0
下载
关闭预览

相关内容

软件(中国大陆及香港用语,台湾作软体,英文:Software)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为编程语言、系统软件、应用软件和介于这两者之间的中间件。软件就是程序加文档的集合体。
综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
158页!天大等最新《大型语言模型安全:全面综述》
专知会员服务
50+阅读 · 2024年12月24日
【新书】大规模语言模型的隐私与安全,
专知会员服务
29+阅读 · 2024年12月4日
大型语言模型代理的安全与隐私综述
专知会员服务
30+阅读 · 2024年8月5日
大型语言模型网络安全综述
专知会员服务
68+阅读 · 2024年5月12日
【2024新书】大型语言模型安全开发者手册,250页pdf
专知会员服务
76+阅读 · 2024年2月12日
天大最新《大型语言模型评估》全面综述,111页pdf
专知会员服务
88+阅读 · 2023年10月31日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
20+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
美国军方使用的10种反无人机武器(2026年更新)
专知会员服务
1+阅读 · 51分钟前
认知战与交战性质的改变:神经战略视角
专知会员服务
5+阅读 · 5月8日
相关资讯
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
20+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员