Back to search

Universidade de Coimbro

On the Use of Historical Static Data to Detect Software Vulnerable Code

Abstract

dc:description.abstract

As software systems continue to grow in size and complexity, with codebases of ten comprising millions of lines of code, manual approaches to vulnerability detection have become impractical and costly for development teams. To address this issue, automated techniques have been developed to speed up and improve the reliability of the process. Widely used vulnerability detection techniques (e.g., Static Analysis Tools (SATs)) typically produce a high number of False Positives (FPs), identifying benign code units as vulnerabilities. Machine Learning (ML)-based methods have emerged as an alternative, leveraging source code metrics to enhance detection capability. However, they also suffer from high FP rates. A key challenge lies in the continuous evolution of software vulnerabilities, driven by changes in technology, programming practices, and attack methodologies. Conventional ML models usually treat all code samples as equally relevant, overlooking their temporal context and treating older vulnerabilities with the same importance as newer ones. This work investigates the effect of incorporating temporal information into the vulnerability detection process, both in data partitioning and model training. To validate our approach, we train two ML models (eXtreme Gradient Boosting (XGB) and Random Forest (RF)) on a high-dimensional vulnerability dataset extracted from large open-source C/C++ projects (Mozilla, Linux, and Xen), using the Software Metrics (SMs) and alerts from SATs as features. Our approach employs two temporal-aware methods: a sliding-window data split that preserves the dataset’s chronological order, combined with time-based sample weighting techniques that emphasise more recent samples and apply a time-decaying effect. The results show that combining both techniques can capture some degree of temporal dependency in the data and provide modest improvements across most metrics, even compared to industry-standard ML pipelines. These techniques also show significant improvements in reducing the number of FPs in the classification task, though at the cost of some performance, as well as provide an increase in the Balanced Accuracy of most classification tasks. Reductions in misclassification were also observed when classifying the Neutral and vulnerable samples from one of the multiclass categories, the class Memory Management. These findings suggest that although moderate effects can be observed with these temporal-aware techniques, they can reduce the number of FPs and improve performance metrics in specific scenarios.

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Pino, João Miguel Carmo
Advisors dc:contributor.advisor
  • Campos, João Rodrigues de
  • Pereira, José Alexandre D'Abruzzo

Subjects

dc:subject × 9

Rights

dc:rights
Statement dc:rights
  • openAccess
Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Tid
204300533

Chain of custody

source
Harvested from
Universidade de Coimbro
Base URL
estudogeral.sib.uc.pt/oai/request
Last updated
2026-11-26
Source record
OAI-PMH GetRecord
citation

Pino, João Miguel Carmo. On the Use of Historical Static Data to Detect Software Vulnerable Code. 2026. https://hdl.handle.net/10316/122944