How Can ChatGPT Support Human Security Testers to Help Mitigate Supply Chain Attacks?
- 14 November 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 52 (2) , 509-526
Abstract
Developers often build software on top of third-party libraries (Libs) to improve programmer productivity and software quality. The libraries may contain vulnerabilities exploitable by hackers to attack the applications (Apps) built on top of them. Such attacks are known as software supply chain attacks, the documented number of which has increased 742% in 2022. Researchers and developers created tools to mitigate such attacks, by scanning the library dependencies of Apps, identifying the usage of vulnerable library versions, and suggesting secure alternatives to vulnerable dependencies. However, recent studies show that many developers do not trust the reports by these tools; they need code or evidence to demonstrate how library vulnerabilities lead to security exploits, in order to assess vulnerability severity and modification necessity. Unfortunately, manually crafting demos of application-specific attacks is challenging and timeconsuming, and there is insufficient tool support to automate that procedure. To help developers enhance software security, in this study, we systematically explored the usage of a large language model (LLM)–ChatGPT-4.0–to generate security tests, which unit tests demonstrate how vulnerable library dependencies facilitate the supply chain attacks to given Apps. In our exploration, we defined prompt templates to take in the various vulnerability-relevant information we manually collected, and generated prompts from those templates to query ChatGPT for security test generation. We found that ChatGPT-generated tests demonstrated 24 evidence or proof of vulnerability for 49 Apps. To assess the consistency of test generation, we also evaluated another five state-of-the-art LLMs. All the models generated security tests for at least 17 cases that successfully demonstrate the vulnerabilities. We filed six reports for the newly revealed vulnerabilities in Apps, and got four Common Vulnerability Entries (CVEs) assigned. Our use of ChatGPT outperformed two state-of-the-art security test generators (TRANSFER and SIEGE), by generating a lot more tests and achieving more attacks. Our research will shed light on new research in security test generation.Keywords
Funding Information
- NSF (1845446)
- NSF (1929701)
- ONR (N00014-22-1-2057)
- CCI-PE6GLBAE
This publication has 43 references indexed in Scilit:
- Performance and Reproducibility of Large Language Models in Named Entity Recognition: Considerations for the Use in Controlled EnvironmentsDrug Safety, 2024
- An Analysis of the Automatic Bug Fixing Performance of ChatGPT2023
- FuSeBMC: An Energy-Efficient Test Generator for Finding Security Vulnerabilities in C Programs2021
- Toward Automated Exploit Generation for Known Vulnerabilities in Open-Source Libraries2021
- Detection, assessment and mitigation of vulnerabilities in open source dependenciesEmpirical Software Engineering, 2020
- Detecting Suspicious Package Updates2019
- Ultra-Large Repair Search Space with Automatically Mined Templates: The Cardumen Mode of Astor2018
- CogniCrypt: Supporting developers in using cryptography2017
- VuRLE: Automatic Vulnerability Detection and Repair by Learning from Examples2017
- A survey of covert channels and countermeasures in computer network protocolsIEEE Communications Surveys & Tutorials, 2007