arXiv:2410.21968cs.CRcs.AI2024-10被引 6

用深度学习自动检测Python代码中的SQL注入漏洞,效果优于传统工具。

Automated Vulnerability Detection Using Deep Learning Technique

  • 用CodeBERT将代码转为向量,再用LSTM模型识别漏洞模式。
  • 相比现有工具,精确率、召回率和F1分数均更高。
  • 方法可扩展至其他语言和漏洞类型,适合安全测试人员参考。

本研究探索使用深度学习技术,特别是CodeBERT模型,提升Python应用的代码安全测试能力,用于检测SQL注入漏洞。与传统安全测试方法相比,该方法将源代码转化为向量表示,并训练长短期记忆(LSTM)模型以识别脆弱模式。相较于现有的静态应用安全测试(SAST)工具,该模型在精度、召回率和F1分数上表现更优。研究表明,借助CodeBERT的上下文理解能力,深度学习能显著提升漏洞检测效果,提供一种可推广至多种编程语言和漏洞类型的可扩展方案。

原文摘要 · Abstract (English)

Our work explores the utilization of deep learning, specifically leveraging the CodeBERT model, to enhance code security testing for Python applications by detecting SQL injection vulnerabilities. Unlike traditional security testing methods that may be slow and error-prone, our approach transforms source code into vector representations and trains a Long Short-Term Memory (LSTM) model to identify vulnerable patterns. When compared with existing static application security testing (SAST) tools, our model displays superior performance, achieving higher precision, recall, and F1-score. The study demonstrates that deep learning techniques, particularly with CodeBERT's advanced contextual understanding, can significantly improve vulnerability detection, presenting a scalable methodology applicable to various programming languages and vulnerability types.

漏洞检测深度学习代码安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。