Improved Vulnerability Detection in Applications Using Machine Learning
摘要
In recent years, the surge in complexity of software systems has underscored the critical importance of detecting and mitigating security vulnerabilities at the source code level. Function-level vulnerabilities, characterized by flaws within specific functions or methods in software code, present significant risks to system security. Conventional approaches to vulnerability detection often rely on manual inspection or static analysis techniques, which are labor intensive and prone to human error. This research project presents an open-source framework based on supervised machine learning techniques for detecting vulnerabilities in source. The framework is motivated by current developments in deep learning methodologies. A distinctive feature of this framework is its utilization of both contextual and non-contextual embedding methods for generating code representations. This duality enables the framework to discern polysemy in code contexts and enhance vulnerability detection accuracy. The project includes a meticulously curated dataset comprising vulnerable functions sourced from nine prominent open-source software projects, facilitating rigorous evaluation and benchmarking. The framework’s usage is facilitated by a straightforward set of instructions. By leveraging the provided Python scripts, users can effortlessly train and test various neural network models with customizable settings, seamlessly integrating with different embedding methods. Furthermore, the framework supports the extraction of high-level representations from trained models, facilitating downstream tasks such as vulnerability classification using alternative classifiers like random forests. This research project not only advances the state of the art in function-level vulnerability detection but also provides a practical and accessible tool for software developers and security practitioners.