Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers

Therese Fehrer, Rocío Cabrera Lozoya, Antonino Sabetta, Dario Di Nucci, Damian A. Tamburri
5/7/2021
7 citations
cs.SEcs.CRcs.LG

Official code: SAP/project-kb (135 stars, Python, Apache-2.0, last commit 2025-03-27). 1 more implementation below.

Abstract

The sources of reliable, code-level information about vulnerabilities that affect open-source software (OSS) are scarce, which hinders a broad adoption of advanced tools that provide code-level detection and assessment of vulnerable OSS dependencies. In this paper, we study the extent to which the output of off-the-shelf static code analyzers can be used as a source of features to represent commits in Machine Learning (ML) applications.

Show full abstract

In particular, we investigate how such features can be used to construct embeddings and train ML models to automatically identify source code commits that contain vulnerability fixes. We analyze such embeddings for security-relevant and non-security-relevant commits, and we show that, although in isolation they are not different in a statistically significant manner, it is possible to use them to construct a ML pipeline that achieves results comparable with the state of the art. We also found that the combination of our method with commit2vec represents a tangible improvement over the state of the art in the automatic identification of commits that fix vulnerabilities: the ML models we construct and commit2vec are complementary, the former being more generally applicable, albeit not as accurate.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
SAP/project-kbOfficial135PythonApache-2.02025-03-27
dardin88/fse_2021Official4––2021-05-07
SAP/project-kbOfficial100%
Apache-2.0

Home page of project "KB"

13582Python, TeX1 years agoApache-2.0
open-sourcevulnerability-data
dardin88/fse_2021Official100%

Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers

42May 7, 20215 years ago

Similar Papers

Cite this paper

@article{fehrer2021detecting,
  title  = {Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers},
  author = {Therese Fehrer and Rocío Cabrera Lozoya and Antonino Sabetta and Dario Di Nucci and Damian A. Tamburri},
  year   = {2021},
  eprint = {2105.03346},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.03346}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.03346.svg)](https://codeofpaper.com/paper/2105.03346)

Discussion