Artificially Insecure: Examining GitHub Copilot’s AI-based Vulnerability Prevention System

AI-assisted programming has quickly become standard practice in software development life cycles. GitHub Copilot is a popular AI pair-programmer used by developers and enterprises. The aim of these tools is to help developers write better code faster. However, recent research has shown that AI-assisted programming tools often produce code that contains at least one vulnerability. The creators of these tools are working to prevent vulnerable coding patterns from being generated. For example, GitHub has implemented new security features that prevent vulnerable coding patterns from being generated. However, subsequent research has shown that issues persist, and continued work is needed. In this paper we evaluate Copilot’s current performance generating code in Python, JavaScript and C, when presented with Common Weakness Enumerators (CWE) scenarios from the LLMSecEval dataset. These results and their comparison to past studies shed new light on the degree secureness of code generated by Copilot has improved and provides a fresh benchmark for future studies. Our results show that despite Copilot producing 97.03% functionally correct code snippets, 30.6% contained at least one vulnerability. In addition, the results of this experiment found that less secure code is generated when working in JavaScript than snippets produced in Python and C. Consequently, developers should continue to critically evaluate code generated by Copilot.

Authors

Institutions

Publication Details

Published
2025-06-23
DOI
https://doi.org/10.1109/svcc65277.2025.11133629
Citations
1
Primary Topic
Information and Cyber Security
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Artificially Insecure: Examining GitHub Copilot’s AI-based Vulnerability Prevention System

Thomas Hartley, Nathan Armstrong
1 citations
Information and Cyber Security
3.25
article

Artificially Insecure: Examining GitHub Copilot’s AI-based Vulnerability Prevention System

Thomas Hartley, Nathan Armstrong
article en
1 citations

Abstract

AI-assisted programming has quickly become standard practice in software development life cycles. GitHub Copilot is a popular AI pair-programmer used by developers and enterprises. The aim of these tools is to help developers write better code faster. However, recent research has shown that AI-assisted programming tools often produce code that contains at least one vulnerability. The creators of these tools are working to prevent vulnerable coding patterns from being generated. For example, GitHub has implemented new security features that prevent vulnerable coding patterns from being generated. However, subsequent research has shown that issues persist, and continued work is needed. In this paper we evaluate Copilot’s current performance generating code in Python, JavaScript and C, when presented with Common Weakness Enumerators (CWE) scenarios from the LLMSecEval dataset. These results and their comparison to past studies shed new light on the degree secureness of code generated by Copilot has improved and provides a fresh benchmark for future studies. Our results show that despite Copilot producing 97.03% functionally correct code snippets, 30.6% contained at least one vulnerability. In addition, the results of this experiment found that less secure code is generated when working in JavaScript than snippets produced in Python and C. Consequently, developers should continue to critically evaluate code generated by Copilot.

University of Wolverhampton (GB)
Openalex Percentile: Top 7%
Information and Cyber Security
3.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.