Skip to main content
QUICK REVIEW

[论文解读] Detecting Security-Relevant Methods using Multi-label Machine Learning

Oshando Johnson, Goran Piskachev|arXiv (Cornell University)|Jan 1, 2024
Network Security and Intrusion Detection被引用 1
一句话总结

本文提出 Dev-Assist,一个 IntelliJ IDEA 插件,利用多标签机器学习检测 Java 程序中的安全相关方法(SRMs),通过建模标签相关性,相较于二元相关方法提升了精确率。该插件可自动生成 SAST 配置,运行静态分析,并在 IDE 中显示结果,将手动工作量减少 50%,且平均 F1 值高于先前方法。

ABSTRACT

To detect security vulnerabilities, static analysis tools need to be configured with security-relevant methods. Current approaches can automatically identify such methods using binary relevance machine learning approaches. However, they ignore dependencies among security-relevant methods, over-generalize and perform poorly in practice. Additionally, users have to nevertheless manually configure static analysis tools using the detected methods. Based on feedback from users and our observations, the excessive manual steps can often be tedious, error-prone and counter-intuitive. In this paper, we present Dev-Assist, an IntelliJ IDEA plugin that detects security-relevant methods using a multi-label machine learning approach that considers dependencies among labels. The plugin can automatically generate configurations for static analysis tools, run the static analysis, and show the results in IntelliJ IDEA. Our experiments reveal that Dev-Assist's machine learning approach has a higher F1-Measure than related approaches. Moreover, the plugin reduces and simplifies the manual effort required when configuring and using static analysis tools.

研究动机与目标

  • 解决现有二元相关机器学习方法在检测安全相关方法(SRMs)时的局限性,这些方法忽略标签相关性且泛化能力差。
  • 通过自动化 SRM 检测与规范生成,减少静态分析工具(SAST)配置的手动操作与错误。
  • 在 IntelliJ IDEA 环境中端到端集成漏洞检测,提升开发人员工作流与结果可解释性。
  • 与最先进的方法(如 SWAN 和 SWAN-Assist)相比,提升 SRM 分类的精确率与 F1 值。

提出的方法

  • 采用多标签机器学习模型,捕捉 SRM 标签(如源、汇、净化器、CWE 类型)之间的依赖关系,而非将其视为独立标签。
  • 以方法签名和代码结构特征作为输入特征,利用 Java 代码中的语义信息训练模型。
  • 实现 IntelliJ IDEA 插件,集成机器学习模型,在开发过程中实时检测 SRMs。
  • 从检测到的 SRMs 自动生成与 SAST 兼容的规范(如 fluentTQL),并集成 Qodana 和 SecuCheck 以进行静态分析。
  • 将多个手动步骤——导出 SRMs、配置 SAST、运行分析、解释结果——整合为单击式工作流。
  • 通过交叉验证和随机样本的手动验证评估模型性能,按 CWE 类别测量精确率。

实验结果

研究问题

  • RQ1多标签机器学习方法在检测 Java 中的安全相关方法方面是否优于二元相关方法?
  • RQ2该插件能否在实际中减少配置和使用静态分析工具所需的手动工作量?
  • RQ3建模标签相关性在多大程度上提升了 SRM 检测的精确率与 F1 值?
  • RQ4在 IDE 内部,自动化配置生成与结果集成在漏洞检测中的有效性如何?

主要发现

  • Dev-Assist 的多标签方法在 F1 值上优于二元相关方法,证明其具备更好的泛化能力与标签相关性建模能力。
  • SRM 标签的平均精确率为 0.72,其中 CWE862/CWE863 的精确率最高,达 0.95。
  • 在随机样本验证中,CWE89 的精确率最低,为 0.35,但 Dev-Assist 在 android.database.sqlite.SQLiteDatabase 类中正确识别出 74 个汇点和 CWE89 方法,实际表现优于 SWAN-Assist。
  • 该插件将 SAST 配置与分析的手动任务数量及估算时间减少 50%,从 25 分钟降至 12.5 分钟(真实场景评估)。
  • 结果直接在 IntelliJ IDEA 中显示,与外部 SARIF 文件分析相比,显著减少了结果解读与验证的时间与精力。
  • 在 Android SQLite 类中,74 个被正确标记的 CWE89 方法中,超过 80% 未被 SWAN-Assist 识别为安全相关,表明精确率得到显著提升。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。