Return
Refactoring techniques for software vulnerabilities
DOI:10.1016/j.jss.2026.112962.png)
Abstract
En 中文
Software vulnerabilities pose a significant threat to the security of systems. While much of the existing research focuses on detecting vulnerabilities, the potential of refactoring for vulnerability mitigation has not been explored much. To bridge this gap, we introduce a set of refactoring techniques aimed at mitigating various types of vulnerabilities. We begin by categorizing vulnerabilities based on the weakness types defined in the CWE system, concentrating on eight categories that pose significant risks. For each CWE in each category, we generate five samples using ChatGPT, creating a dataset of 405 samples. These samples are rigorously analyzed manually for their validity. Based on the dataset, we identify the characteristics of each category, define the problem within the category, and develop a specific refactoring solution for the problem. We evaluate these techniques using the Snyk tool on twenty-one active open-source projects. The result demonstrates an 89% reduction in vulnerabilities after applying the refactoring techniques, providing insights on enhancing software security through refactoring-based strategies.
Keywords:
software vulnerabilities
refactoring techniques
CWE categorization
vulnerability mitigation
software security
Journal
IF:
4.1
Papers:
5.4K
Citations:
8.4K

