Reality Check: Assessing GPT-4 in Fixing Real-World Software Vulnerabilities. Ságodi, Z., Antal, G., Bogenfürst, B., Isztin, M., Hegedűs, P., & Ferenc, R. In Proceedings of the 28th International Conference on Evaluation and Assessment in Software Engineering, pages 252–261, Salerno Italy, June, 2024. ACM.
Reality Check: Assessing GPT-4 in Fixing Real-World Software Vulnerabilities [link]Paper  doi  abstract   bibtex   
Discovering and mitigating software vulnerabilities is a challenging task. These vulnerabilities are often caused by simple, otherwise (and in other contexts) harmless code snippets (e.g., unchecked path traversal). Large Language Models (LLMs) promise to revolutionize not just human-machine interactions but various software engineering tasks as well, including the automatic repair of vulnerabilities. However, currently, it is hard to assess the performance, robustness, and reliability of these models as most of their evaluation has been done on small, synthetic examples. In our work, we systematically evaluate the automatic vulnerability fixing capabilities of GPT-4, a popular LLM, using a database of real-world Java vulnerabilities, Vul4J. We expect the model to provide fixes for vulnerable methods, which we evaluate manually and based on unit test results included in the Vul4J database. GPT-4 provided perfect fixes consistently for at least 12 out of the total 46 examined vulnerabilities, which could be applied as is. In an additional 5 cases, the provided textual instructions would help to fix the vulnerabilities in a practical scenario (despite the provided code being incorrect). Our findings, similar to others, also show that prompting has a significant effect. CCS CONCEPTS • Software and its engineering → Software maintenance tools.
@inproceedings{sagodi_reality_2024,
	address = {Salerno Italy},
	title = {Reality {Check}: {Assessing} {GPT}-4 in {Fixing} {Real}-{World} {Software} {Vulnerabilities}},
	isbn = {979-8-4007-1701-7},
	shorttitle = {Reality {Check}},
	url = {https://dl.acm.org/doi/10.1145/3661167.3661207},
	doi = {10.1145/3661167.3661207},
	abstract = {Discovering and mitigating software vulnerabilities is a challenging task. These vulnerabilities are often caused by simple, otherwise (and in other contexts) harmless code snippets (e.g., unchecked path traversal). Large Language Models (LLMs) promise to revolutionize not just human-machine interactions but various software engineering tasks as well, including the automatic repair of vulnerabilities. However, currently, it is hard to assess the performance, robustness, and reliability of these models as most of their evaluation has been done on small, synthetic examples. In our work, we systematically evaluate the automatic vulnerability fixing capabilities of GPT-4, a popular LLM, using a database of real-world Java vulnerabilities, Vul4J. We expect the model to provide fixes for vulnerable methods, which we evaluate manually and based on unit test results included in the Vul4J database. GPT-4 provided perfect fixes consistently for at least 12 out of the total 46 examined vulnerabilities, which could be applied as is. In an additional 5 cases, the provided textual instructions would help to fix the vulnerabilities in a practical scenario (despite the provided code being incorrect). Our findings, similar to others, also show that prompting has a significant effect. CCS CONCEPTS • Software and its engineering → Software maintenance tools.},
	language = {en},
	urldate = {2024-06-18},
	booktitle = {Proceedings of the 28th {International} {Conference} on {Evaluation} and {Assessment} in {Software} {Engineering}},
	publisher = {ACM},
	author = {Ságodi, Zoltán and Antal, Gábor and Bogenfürst, Bence and Isztin, Martin and Hegedűs, Péter and Ferenc, Rudolf},
	month = jun,
	year = {2024},
	keywords = {Jab/\#EICEASE},
	pages = {252--261},
}

Downloads: 0