一句话:提出 Valar,用值流分析与主动学习对静态分析告警排序,提升真告警优先级并抑制误报。
静态分析在缺陷与漏洞检测中作用关键,但高误报率严重阻碍其工业落地。本文提出 Valar,一种面向高级值流分析的告警排序方法,借助主动学习技术降低人工审查代价:主动学习通过最大化每条用户标注的收益来识别真/假告警,值流则提供程序操作语义的简洁而全面的摘要,使 Valar 能推理告警之间的潜在关联,优先挑选最有价值的未标注告警交由用户判断;随着标注增多,其主动学习模型不断精化,准确率随之提升。作者在 20 个真实 C/C++ 程序上使用三种基于值流的检查器进行评估,结果表明 Valar 显著降低误报优先级并让多数真告警排在前面:在 90% 的项目中所有真告警都位于前 47%,在 75% 的项目中 90% 的真告警位于前 22%。此外 Valar 无需预训练,每次告警排序的计算时间不足 0.1 秒。
Static analyzers play a critical role in program defects and security vulnerabilities detection. Despite their importance, the widespread adoption of static analysis techniques in industrial development faces numerous obstacles, among which the high rate of false alarms constitutes a significant one. To address this issue, we propose a novel approach called Valar, which performs alarm ranking for advanced value-flow analysis using the active learning technique. Active learning algorithms minimize the manual effort for alarm inspection by maximizing the effect of each user labeling in recognizing true/false alarms. Meanwhile, the value-flows provide Valar with a concise and comprehensive summary of the operational semantics about programs. Based on this, Valar is able to reason about the potential correlations between alarms and prioritize the most profitable unlabeled alarm. Additionally, the accuracy of Valar increases as more user labels are given and Valar's active learning model is further refined. We evaluate Valar on 20 real-world C/C++ programs using three value-flow based checkers. Our experimental results demonstrated that Valar significantly lowers the priorities of false alarms with most true alarms ranked high. Notably, Valar ranked all true alarms in the top 47% in 90% projects and ranked 90% true alarms in the top 22% in 75% projects. Furthermore, Valar has no requirement for pretraining and has a negligible computation time of less than 0.1s for each alarm prioritization.