Enhancing Automated Vulnerability Repair Through Dependency Embedding and Pattern Store

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In recent years, the proliferation of software vulnerabilities has significantly increased the complexities and costs associated with manual remediation efforts. Although AI-based methods for automated vulnerability repair are gaining traction, many existing approaches have two limitations: 1) treat code as a sequence of tokens, neglecting critical structural information like control flow and data flow, and 2) do not fully utilize the repair patterns of vulnerabilities. To address these limitations, we introduce FAVOR, an innovative tool that utilizes both the vulnerable function's code and its control flow graph (CFG) as inputs. FAVOR incorporates a dependency embedding module to capture structural and dependency information and leverages CodeT5, a state-of-the-art model pre-trained for code generation tasks. To further enhance the repair process, we introduce a pattern store that uses KNN search to retrieve similar past repair patterns, which helps guide the model toward generating more contextually accurate patches. In our experiments, FAVOR, trained on a dataset of 6548 faulty C/C++ functions, repaired 45 more vulnerabilities compared to VULREPAIR, demonstrating improved accuracy and efficiency in automated vulnerability repair.

Original languageEnglish
Title of host publicationProceedings - 2025 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages193-204
Number of pages12
ISBN (Electronic)9798331535100
DOIs
StatePublished - 2025
Event32nd IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2025 - Montreal, Canada
Duration: 4 Mar 20257 Mar 2025

Publication series

NameProceedings - 2025 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2025

Conference

Conference32nd IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2025
Country/TerritoryCanada
CityMontreal
Period4/03/257/03/25

Keywords

  • Automatic Program Repair
  • Automatic Vulnerability Repair
  • Dependency Embedding
  • Software Vulnerability

Fingerprint

Dive into the research topics of 'Enhancing Automated Vulnerability Repair Through Dependency Embedding and Pattern Store'. Together they form a unique fingerprint.

Cite this