[Paper Review] Detecting Security-Relevant Methods using Multi-label Machine Learning
This paper presents Dev-Assist, an IntelliJ IDEA plugin that uses multi-label machine learning to detect security-relevant methods (SRMs) in Java programs, improving precision over binary relevance methods by modeling label correlations. The plugin automatically generates SAST configurations, runs static analysis, and displays results in the IDE, reducing manual effort by 50% and achieving an average F1-measure higher than prior approaches.
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.
Motivation & Objective
- To address the limitations of existing binary relevance machine learning approaches in detecting security-relevant methods (SRMs), which ignore label correlations and generalize poorly.
- To reduce the manual, error-prone configuration of static analysis tools (SAST) by automating SRM detection and specification generation.
- To integrate end-to-end vulnerability detection within the IntelliJ IDEA environment, improving developer workflow and result interpretability.
- To improve precision and F1-measure in SRM classification compared to state-of-the-art methods like SWAN and SWAN-Assist.
Proposed method
- Employ a multi-label machine learning model that captures dependencies among SRM labels (e.g., sources, sinks, sanitizers, CWE types) instead of treating them as independent.
- Use method signatures and structural code features as input features, leveraging semantic information from Java code to train the model.
- Implement a plugin for IntelliJ IDEA that integrates the ML model to detect SRMs in real time during development.
- Automatically generate SAST-compatible specifications (e.g., fluentTQL) from detected SRMs and integrate with Qodana and SecuCheck for static analysis.
- Consolidate multiple manual steps—exporting SRMs, configuring SAST, running analysis, and interpreting results—into a single-click workflow.
- Evaluate model performance using cross-validation and manual validation on random samples, with precision measured per CWE category.
Experimental results
Research questions
- RQ1Does a multi-label machine learning approach outperform binary relevance methods in detecting security-relevant methods in Java?
- RQ2Can the plugin reduce the manual effort required to configure and use static analysis tools in practice?
- RQ3To what extent does modeling label correlations improve precision and F1-measure in SRM detection?
- RQ4How effective is the automated configuration generation and result integration within the IDE for vulnerability detection?
Key findings
- Dev-Assist’s multi-label approach achieved a higher F1-measure than binary relevance methods, demonstrating better generalization and label correlation modeling.
- The average precision across SRM labels was 0.72, with CWE862/CWE863 achieving the highest precision at 0.95.
- CWE89 had the lowest precision at 0.35 in random sample validation, but Dev-Assist correctly labeled 74 sinks and CWE89 methods in android.database.sqlite.SQLiteDatabase, outperforming SWAN-Assist in practice.
- The plugin reduced the number of manual tasks and estimated time for SAST configuration and analysis by 50%, from 25 minutes to 12.5 minutes in a real-world evaluation.
- Results were displayed directly in IntelliJ IDEA, reducing the time and effort needed to interpret and validate findings compared to external SARIF file analysis.
- More than 80% of the 74 correctly labeled CWE89 methods in the Android SQLite class were not classified as security-relevant by SWAN-Assist, indicating improved precision.
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.