测试集作为静态分析警报分类器的训练数据源
Test Suites as a Source of Training Data for Static Analysis Alert Classifiers
摘要:
缺陷查找静态分析工具通常会生成大量的代码缺陷警报,包括许多误报。为了节省对这些警报进行分类的人力,大量工作尝试使用机器学习来对警报进行分类和优先级排序。然而,识别一组有用的训练数据仍然是在许多情况下开发这种分类器的基本挑战。我们建议使用静态分析测试套件(即,“基准”程序的存储库,其被专门构建以测试静态分析工具的覆盖率和精度)作为训练数据的新来源。在一个案例研究中,我们通过在Juliet C/C++测试套件上执行各种静态分析器来生成大量警报,并且通过引用Juliet测试套件元数据来自动导出这些警报的地面实况标签。最后,我们使用这些数据来训练分类器,以预测警报是否是误报。我们的分类器获得了较高的精度(90.2%)和召回率(88.2%)的大量的代码缺陷类型的保留测试集。这个初步结果表明,在测试套件数据上预先训练分类器可以帮助在数据有限的上下文中快速启动静态分析警报分类。
英文摘要:
Flaw-finding static analysis tools typically generate large volumes of code flaw alerts including many false positives. To save on human effort to triage these alerts, a significant body of work attempts to use machine learning to classify and prioritize alerts. Identifying a useful set of training data, however, remains a fundamental challenge in developing such classifiers in many contexts. We propose using static analysis test suites (i.e., repositories of "benchmark" programs that are purpose-built to test coverage and precision of static analysis tools) as a novel source of training data. In a case study, we generated a large quantity of alerts by executing various static analyzers on the Juliet C/C++ test suite, and we automatically derived ground truth labels for these alerts by referencing the Juliet test suite metadata. Finally, we used this data to train classifiers to predict whether an alert is a false positive. Our classifiers obtained high precision (90.2%) and recall (88.2%) for a large number of code flaw types on a hold-out test set. This preliminary result suggests that pre-training classifiers on test suite data could help to jumpstart static analysis alert classification in data-limited contexts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。