Hiding in Plain Sight: On the Robustness of AI-Generated Code Detection. Pordanesh, S., Bukhari, S., Tan, B., & De Carli, L. In Egele, M., Moonsamy, V., Gruss, D., & Carminati, M., editors, Detection of Intrusions and Malware, and Vulnerability Assessment, of Lecture Notes in Computer Science (LNCS), pages 44–64, Cham, 2025. Springer Nature Switzerland. doi abstract bibtex AI code assistants, such as GitHub Copilot, are an increasingly popular coding aid, but they also present risks. Large language models (LLMs) upon which those assistants are built may generate insecure/incorrect code, either by accident or as a result of code poisoning attacks. In general, LLMs obfuscate the lineage of source code used for training. This is a problem, for example, in the context of supply chain security, where tracking provenance is of the utmost importance. While a number of recent approaches can flag AI-generated code based on a combination of lexical and syntactic features, such works have not been evaluated in realistic settings. First, we identify and operationalize a number of recently proposed AI code identification tools, measuring their baseline performance on datasets generated by state-of-the-art models. Then, we verify the robustness of such approaches to variations in training sets and prompting strategies. Results show that existing AI code detectors tend to be fragile and have limited accuracy in real-world scenarios.
@inproceedings{pordanesh_hiding_2025,
address = {Cham},
series = {Lecture {Notes} in {Computer} {Science} ({LNCS})},
title = {Hiding in {Plain} {Sight}: {On} the {Robustness} of {AI}-{Generated} {Code} {Detection}},
isbn = {978-3-031-97623-0},
doi = {https://doi.org/10.1007/978-3-031-97623-0_3},
abstract = {AI code assistants, such as GitHub Copilot, are an increasingly popular coding aid, but they also present risks. Large language models (LLMs) upon which those assistants are built may generate insecure/incorrect code, either by accident or as a result of code poisoning attacks. In general, LLMs obfuscate the lineage of source code used for training. This is a problem, for example, in the context of supply chain security, where tracking provenance is of the utmost importance. While a number of recent approaches can flag AI-generated code based on a combination of lexical and syntactic features, such works have not been evaluated in realistic settings. First, we identify and operationalize a number of recently proposed AI code identification tools, measuring their baseline performance on datasets generated by state-of-the-art models. Then, we verify the robustness of such approaches to variations in training sets and prompting strategies. Results show that existing AI code detectors tend to be fragile and have limited accuracy in real-world scenarios.},
booktitle = {Detection of {Intrusions} and {Malware}, and {Vulnerability} {Assessment}},
publisher = {Springer Nature Switzerland},
author = {Pordanesh, Saman and Bukhari, Sufiyan and Tan, Benjamin and De Carli, Lorenzo},
editor = {Egele, Manuel and Moonsamy, Veelasha and Gruss, Daniel and Carminati, Michele},
year = {2025},
keywords = {\#nosource},
pages = {44--64},
}
Downloads: 0
{"_id":"8FcjTXzktDvuhatKY","bibbaseid":"pordanesh-bukhari-tan-decarli-hidinginplainsightontherobustnessofaigeneratedcodedetection-2025","author_short":["Pordanesh, S.","Bukhari, S.","Tan, B.","De Carli, L."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","address":"Cham","series":"Lecture Notes in Computer Science (LNCS)","title":"Hiding in Plain Sight: On the Robustness of AI-Generated Code Detection","isbn":"978-3-031-97623-0","doi":"https://doi.org/10.1007/978-3-031-97623-0_3","abstract":"AI code assistants, such as GitHub Copilot, are an increasingly popular coding aid, but they also present risks. Large language models (LLMs) upon which those assistants are built may generate insecure/incorrect code, either by accident or as a result of code poisoning attacks. In general, LLMs obfuscate the lineage of source code used for training. This is a problem, for example, in the context of supply chain security, where tracking provenance is of the utmost importance. While a number of recent approaches can flag AI-generated code based on a combination of lexical and syntactic features, such works have not been evaluated in realistic settings. First, we identify and operationalize a number of recently proposed AI code identification tools, measuring their baseline performance on datasets generated by state-of-the-art models. Then, we verify the robustness of such approaches to variations in training sets and prompting strategies. Results show that existing AI code detectors tend to be fragile and have limited accuracy in real-world scenarios.","booktitle":"Detection of Intrusions and Malware, and Vulnerability Assessment","publisher":"Springer Nature Switzerland","author":[{"propositions":[],"lastnames":["Pordanesh"],"firstnames":["Saman"],"suffixes":[]},{"propositions":[],"lastnames":["Bukhari"],"firstnames":["Sufiyan"],"suffixes":[]},{"propositions":[],"lastnames":["Tan"],"firstnames":["Benjamin"],"suffixes":[]},{"propositions":[],"lastnames":["De","Carli"],"firstnames":["Lorenzo"],"suffixes":[]}],"editor":[{"propositions":[],"lastnames":["Egele"],"firstnames":["Manuel"],"suffixes":[]},{"propositions":[],"lastnames":["Moonsamy"],"firstnames":["Veelasha"],"suffixes":[]},{"propositions":[],"lastnames":["Gruss"],"firstnames":["Daniel"],"suffixes":[]},{"propositions":[],"lastnames":["Carminati"],"firstnames":["Michele"],"suffixes":[]}],"year":"2025","keywords":"#nosource","pages":"44–64","bibtex":"@inproceedings{pordanesh_hiding_2025,\n\taddress = {Cham},\n\tseries = {Lecture {Notes} in {Computer} {Science} ({LNCS})},\n\ttitle = {Hiding in {Plain} {Sight}: {On} the {Robustness} of {AI}-{Generated} {Code} {Detection}},\n\tisbn = {978-3-031-97623-0},\n\tdoi = {https://doi.org/10.1007/978-3-031-97623-0_3},\n\tabstract = {AI code assistants, such as GitHub Copilot, are an increasingly popular coding aid, but they also present risks. Large language models (LLMs) upon which those assistants are built may generate insecure/incorrect code, either by accident or as a result of code poisoning attacks. In general, LLMs obfuscate the lineage of source code used for training. This is a problem, for example, in the context of supply chain security, where tracking provenance is of the utmost importance. While a number of recent approaches can flag AI-generated code based on a combination of lexical and syntactic features, such works have not been evaluated in realistic settings. First, we identify and operationalize a number of recently proposed AI code identification tools, measuring their baseline performance on datasets generated by state-of-the-art models. Then, we verify the robustness of such approaches to variations in training sets and prompting strategies. Results show that existing AI code detectors tend to be fragile and have limited accuracy in real-world scenarios.},\n\tbooktitle = {Detection of {Intrusions} and {Malware}, and {Vulnerability} {Assessment}},\n\tpublisher = {Springer Nature Switzerland},\n\tauthor = {Pordanesh, Saman and Bukhari, Sufiyan and Tan, Benjamin and De Carli, Lorenzo},\n\teditor = {Egele, Manuel and Moonsamy, Veelasha and Gruss, Daniel and Carminati, Michele},\n\tyear = {2025},\n\tkeywords = {\\#nosource},\n\tpages = {44--64},\n}\n\n","author_short":["Pordanesh, S.","Bukhari, S.","Tan, B.","De Carli, L."],"editor_short":["Egele, M.","Moonsamy, V.","Gruss, D.","Carminati, M."],"key":"pordanesh_hiding_2025","id":"pordanesh_hiding_2025","bibbaseid":"pordanesh-bukhari-tan-decarli-hidinginplainsightontherobustnessofaigeneratedcodedetection-2025","role":"author","urls":{},"keyword":["#nosource"],"metadata":{"authorlinks":{}}},"bibtype":"inproceedings","biburl":"https://api.zotero.org/users/4645877/collections/5QADJUWI/items?key=OGCZ3uLZZq4lLIXadnuJrB1J&format=bibtex&limit=100","dataSources":["TRtmubHSqHw6999cH","Wsv2bQ4jPuc7qme8R"],"keywords":["#nosource"],"search_terms":["hiding","plain","sight","robustness","generated","code","detection","pordanesh","bukhari","tan","de carli"],"title":"Hiding in Plain Sight: On the Robustness of AI-Generated Code Detection","year":2025}