Can generative AI detect and fix real-world cryptographic misuses?

IF 4.1 2区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Ehsan Firouzi, Mohammad Ghafari
{"title":"Can generative AI detect and fix real-world cryptographic misuses?","authors":"Ehsan Firouzi,&nbsp;Mohammad Ghafari","doi":"10.1016/j.jss.2025.112650","DOIUrl":null,"url":null,"abstract":"<div><div>We evaluate ChatGPT’s ability to detect and fix cryptographic API misuses. We show that GPT-4o can achieve F1 scores above 0.90 on two established benchmarks. We also assess the model on real-world code: on the GitHub samples, it attains an F1 score of 0.84 and a Matthews Correlation Coefficient (MCC) of 0.81; on the Android samples, it achieves an F1 score of 0.85 but a slightly lower MCC of 0.76. We noted that several factors such as naming conventions and code structure influence GPT’s performance. However, when it correctly flags a misuse, it is often able to suggest effective fixes. We also reported the identified misuses in GitHub repositories and received promising feedback from developers. Finally, a comparison between GPT and a state-of-the-art crypto-misuse detector shows GPT’s strong potential for adoption in real-world settings.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"232 ","pages":"Article 112650"},"PeriodicalIF":4.1000,"publicationDate":"2025-10-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S016412122500319X","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

We evaluate ChatGPT’s ability to detect and fix cryptographic API misuses. We show that GPT-4o can achieve F1 scores above 0.90 on two established benchmarks. We also assess the model on real-world code: on the GitHub samples, it attains an F1 score of 0.84 and a Matthews Correlation Coefficient (MCC) of 0.81; on the Android samples, it achieves an F1 score of 0.85 but a slightly lower MCC of 0.76. We noted that several factors such as naming conventions and code structure influence GPT’s performance. However, when it correctly flags a misuse, it is often able to suggest effective fixes. We also reported the identified misuses in GitHub repositories and received promising feedback from developers. Finally, a comparison between GPT and a state-of-the-art crypto-misuse detector shows GPT’s strong potential for adoption in real-world settings.
生成式人工智能可以检测和修复现实世界中的密码滥用吗?
我们评估ChatGPT检测和修复加密API滥用的能力。我们证明gpt - 40在两个既定基准上可以达到0.90以上的F1分数。我们还在现实世界的代码上评估了模型:在GitHub样本上,它的F1得分为0.84,马修斯相关系数(MCC)为0.81;在Android样本中,它的F1得分为0.85,但MCC略低,为0.76。我们注意到命名约定和代码结构等几个因素会影响GPT的性能。但是,当它正确标记错误时,它通常能够提出有效的修复建议。我们还报告了在GitHub存储库中发现的错误,并收到了开发人员的积极反馈。最后,GPT和最先进的密码滥用检测器之间的比较显示了GPT在现实环境中采用的强大潜力。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Systems and Software
Journal of Systems and Software 工程技术-计算机:理论方法
CiteScore
8.60
自引率
5.70%
发文量
193
审稿时长
16 weeks
期刊介绍: The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to: •Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution •Agile, model-driven, service-oriented, open source and global software development •Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems •Human factors and management concerns of software development •Data management and big data issues of software systems •Metrics and evaluation, data mining of software development resources •Business and economic aspects of software development processes The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信