PrAIoritize:智能合约中漏洞的自动化早期预测与优先级排序
PrAIoritize: Automated Early Prediction and Prioritization of Vulnerabilities in Smart Contracts
AI总结:
本研究提出PrAIoritize方法,结合LLM与NLP技术,利用智能合约缺陷领域词典及DistilBERT模型,实现以太坊智能合约代码审查中缺陷的自动化预测与优先级排序,性能显著优于现有模型,可降低人工分诊成本。
摘要:
研究背景:智能合约因未披露的漏洞和代码缺陷易遭受多种安全威胁。在以太坊智能合约中,及时修复这些代码缺陷面临诸多挑战,凸显了代码审查过程中对自动化早期预测与优先级排序的迫切需求。高效的优先级排序对智能合约安全至关重要。研究目标:为此,本研究旨在提出一种名为PrAIoritize的自动化方法,用于在代码审查过程中对以太坊智能合约的关键代码缺陷进行优先级排序与预测。研究方法:首先,我们收集了来自GitHub上的开源软件(OSS)智能合约代码审查数据,以及通用漏洞披露(CVE)数据库中的相关数据。随后,我们开发了创新的自动化优先级排序方法PrAIoritize,该方法将先进的大语言模型(LLM)与复杂的自然语言处理(NLP)技术相结合。PrAIoritize通过采用智能合约缺陷及其影响的领域特定词典,实现代码审查标注的自动化。在此基础上,对代码审查数据进行特征工程处理,并利用预训练的DistilBERT模型进行优先级分类。最后,使用智能合约代码审查数据对模型进行训练与评估。研究结果:我们的评估显示,与同类分类任务的当前最优基线模型及常用预训练模型(如T5)相比,该方法性能显著提升,F值、精确率和召回率提升幅度达4.82%-27.94%。研究结论:通过使用PrAIoritize,从业者能够高效地对智能合约代码缺陷进行优先级排序,及时修复关键代码缺陷,减少人工分诊所需的时间与精力。
英文摘要:
Context:Smart contracts are prone to numerous security threats due to undisclosed vulnerabilities and code weaknesses. In Ethereum smart contracts, the challenges of timely addressing these code weaknesses highlight the critical need for automated early prediction and prioritization during the code review process. Efficient prioritization is crucial for smart contract security. Objective:Toward this end, our research aims to provide an automated approach, PrAIoritize, for prioritizing and predicting critical code weaknesses in Ethereum smart contracts during the code review process. Method: To do so, we collected smart contract code reviews sourced from Open Source Software (OSS) on GitHub and the Common Vulnerabilities and Exposures (CVE) database. Subsequently, we developed PrAIoritize, an innovative automated prioritization approach. PrAIoritize integrates advanced Large Language Models (LLMs) with sophisticated natural language processing (NLP) techniques. PrAIoritize automates code review labeling by employing a domain-specific lexicon of smart contract weaknesses and their impacts. Following this, feature engineering is conducted for code reviews, and a pre-trained DistilBERT model is utilized for priority classification. Finally, the model is trained and evaluated using code reviews of smart contracts. Results: Our evaluation demonstrates significant improvement over state-of-the-art baselines and commonly used pre-trained models (e.g. T5) for similar classification tasks, with 4.82\%-27.94\% increase in F-measure, precision, and recall. Conclusion: By leveraging PrAIoritize, practitioners can efficiently prioritize smart contract code weaknesses, addressing critical code weaknesses promptly and reducing the time and effort required for manual triage.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。