[Paper Review] Cost-aware Vulnerability Prediction: the HARMLESS Approach
HARMLESS is a cost-aware, active learning vulnerability prediction tool that uses incremental support vector machines to prioritize source code files for security review, estimating remaining vulnerabilities to guide testing toward desired recall levels. In a Firefox case study, it achieved 90%, 95%, and 99% vulnerability recall by reviewing only 26%, 33%, and 45% of files, respectively.
Society needs more secure software. But predicting vulnerabilities is difficult and existing methods are not applied in practical use due to various limitations. The goal of this paper is to design a vulnerability prediction method in a cost-aware manner so that it can balance the percentage of vulnerabilities found against the cost of human effort on security review and test. To this purpose, this paper presents HARMLESS, an incremental vulnerability prediction tool. HARMLESS is an active learner that (a) builds a support vector machine on the source code files reviewed to date; then (b) suggests what other source code files might have vulnerabilities and need to be reviewed next. A unique feature of HARMLESS is that HARMLESS can estimate the number of remaining vulnerabilities. To the best of our knowledge, HARMLESS is the first tool providing such estimation in the arena of vulnerability prediction. Using that estimator, HARMLESS can guide the security review and test to any level of desired recall, i.e. percentage of vulnerabilities found. In experiments on a case study of Mozilla Firefox project, HARMLESS found 90, 95, 99% of known vulnerabilities by reviewing and testing 26, 33, 45% of the source code files, respectively.
Motivation & Objective
- To address the gap in practical vulnerability prediction tools that balance detection effectiveness with human effort costs.
- To develop a method that enables security teams to target specific recall levels (e.g., 90%, 95%) while minimizing code review overhead.
- To estimate the number of remaining undiscovered vulnerabilities during the review process, a novel capability in vulnerability prediction.
- To design an incremental, active learning system that learns from prior reviews and prioritizes high-risk files for future inspection.
Proposed method
- HARMLESS incrementally trains a support vector machine (SVM) on source code files that have been reviewed and labeled as vulnerable or non-vulnerable.
- It uses the trained model to rank all unreviewed files by predicted vulnerability likelihood and suggests the most suspicious ones for next review.
- A unique estimator component predicts the number of remaining vulnerabilities in the unreviewed codebase based on model confidence and historical data.
- The system dynamically adjusts its selection strategy to meet user-specified recall targets by iteratively selecting files that maximize vulnerability discovery per unit of effort.
- The approach integrates active learning principles with cost-aware feedback, allowing teams to stop when desired recall is reached.
Experimental results
Research questions
- RQ1Can a vulnerability prediction system estimate the number of remaining undiscovered vulnerabilities during the review process?
- RQ2To what extent can a cost-aware prediction method reduce the proportion of code reviewed while maintaining high recall of known vulnerabilities?
- RQ3How effectively can an active learning approach with incremental learning and recall targeting outperform static or non-adaptive prediction methods?
- RQ4Can the system guide security testing to achieve specific recall levels (e.g., 90%, 95%) with minimal human effort?
Key findings
- HARMLESS achieved 90% recall by reviewing only 26% of the source code files in the Mozilla Firefox project.
- It reached 95% recall with 33% of files reviewed, demonstrating a significant reduction in required review effort.
- For 99% recall, HARMLESS needed to examine 45% of the files, indicating strong scalability and precision in prioritization.
- The system's ability to estimate remaining vulnerabilities enables proactive control over testing effort and recall targets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.