Is GitHub's Copilot as Bad as Humans at Introducing Vulnerabilities in Code?
Not on the map. Why?
Abstract (arXiv)
Several advances in deep learning have been successfully applied to the software development process. Of recent interest is the use of neural language models to build tools, such as Copilot, that assist in writing code. In this paper we perform a comparative empirical analysis of Copilot-generated code from a security perspective. The aim of this study is to determine if Copilot is as bad as human developers. We investigate whether Copilot is just as likely to introduce the same software vulnerabilities as human developers. Using a dataset of C/C++ vulnerabilities, we prompt Copilot to generate suggestions in scenarios that led to the introduction of vulnerabilities by human developers. The suggestions are inspected and categorized in a 2-stage process based on whether the original vulnerability or fix is reintroduced. We find that Copilot replicates the original vulnerable code about 33% of the time while replicating the fixed code at a 25% rate. However this behaviour is not consistent: Copilot is more likely to introduce some types of vulnerabilities than others and is also more likely to generate vulnerable code in response to prompts that correspond to older vulnerabilities. Overall, given that in a significant number of cases it did not replicate the vulnerabilities previously introduced by human developers, we conclude that Copilot, despite performing differently across various vulnerability types, is not as bad as human developers at introducing vulnerabilities in code.
Key facts. Cited by 63 papers in the map (data through 7 Oct 2026). First posted on arXiv 10 Apr 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 12; 2024: 24; 2025: 14; 2026: 11.
63 papers.
Sort:
By area:
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
- 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
- 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
- 2024Risk Taxonomy, Mitigation, and Assessment Benchmarks of Large Language Model Systemscited by 63
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 52
- 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
- 2024Calibration and Correctness of Language Models for Codecited by 49
- 2023Large Language Models and Simple, Stupid Bugscited by 45
- 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forwardcited by 44
- 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practicescited by 36
38 more
- 2024Automatic Programming: Large Language Models and Beyondcited by 35
- 2024Prompting Techniques for Secure Code Generation: A Systematic Investigationcited by 33
- 2024An Empirical Study on Usage and Perceptions of LLMs in a Software Engineering Projectcited by 28
- 2024Toward Secure Code Generation: Bridging Correctness and Security via Task-Adaptive Vulnerability Modeling and Execution-Based Benchmarkingcited by 26
- 2025The Scales of Justitia: A Comprehensive Survey on Safety Evaluation of LLMscited by 24
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
- 2023Is AI the better programming partner? Human-Human Pair Programming vs. Human-AI pAIr Programmingcited by 20
- 2024Transforming Software Development: Evaluating the Efficiency and Challenges of GitHub Copilot in Real-World Projectscited by 18
- 2025Security and Quality in LLM-Generated Code: A Multi-Language, Multi-Model Analysiscited by 18
- 2023Semantic Compression With Large Language Modelscited by 17
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agentscited by 17
- 2023CrossCodeBench: Benchmarking Cross-Task Generalization of Source Code Modelscited by 16
- 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarioscited by 16
- 2023Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigationcited by 14
- 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Datacited by 14
- 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarioscited by 14
- 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 13
- 2024Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answerscited by 12
- 2024An Investigation into Misuse of Java Security APIs by Large Language Modelscited by 11
- 2025Unsupervised Elicitation of Language Modelscited by 11
- 2025Conformal Prediction Sets for Deep Generative Models via Reduction to Conformal Regressioncited by 10
- 2025SandboxEval: Towards Securing Test Environment for Untrusted Codecited by 10
- 2026AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Developmentcited by 10
- 2023Can ChatGPT Pass An Introductory Level Functional Language Programming Course?cited by 9
- 2024Human-Centered Privacy Research in the Age of Large Language Modelscited by 9
- 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questionscited by 8
- 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?cited by 7
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025Iterative Label Refinement Matters More than Preference Optimization under Weak Supervisioncited by 5
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Reviewcited by 5
- 2024Generative AI Security: Challenges and Countermeasurescited by 4
- 2024Understanding Defects in Generated Codes by Language Modelscited by 4
- 2025Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projectscited by 4
- 2026Accountable Agents in Software Engineering: An Analysis of Terms of Service and a Research Roadmapcited by 3
- 2024Evaluation of the Programming Skills of Large Language Modelscited by 2
- 2024Morescient GAI for Software Engineering (Extended Version)cited by 1
50 most cited of 63 All 63 (JSON)
- 2026CS-Guard: Benchmarking LLM Guardrails for Code Generation Security9 Sep 2026
- 2026A Few Pages of Markdown: Committed AI Configuration and Lower Quality Cost after Coding-Agent Adoption26 Aug 2026
- 2026Vibe Coding and Web Application Security: A Twin-Prompt Study21 Aug 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026Understanding the Impact of AI Code Assistants on Security API Usage: An Empirical Study13 Jul 2026
- 2026Do These Violent Delights Have Violent Ends? Measuring the Post-Merge Fate of Agentic Code10 Jul 2026
- 2026Enhancing Reliability in LLM-Based Secure Code Generation22 May 2026
- 2026Security of LLM-generated Code: A Comparative Analysis21 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026Accountable Agents in Software Engineering: An Analysis of Terms of Service and a Research Roadmap6 May 2026
- 2026AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Development20 Jan 2026
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agents6 Nov 2025
38 more
- 2025Fortifying LLM-Based Code Generation with Graph-Based Reasoning on Secure Coding Practices8 Oct 2025
- 2025Unsupervised Elicitation of Language Models11 Jun 2025
- 2025The Scales of Justitia: A Comprehensive Survey on Safety Evaluation of LLMs6 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025
- 2025SandboxEval: Towards Securing Test Environment for Untrusted Code27 Mar 2025
- 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarios16 Mar 2025
- 2025Conformal Prediction Sets for Deep Generative Models via Reduction to Conformal Regression13 Mar 2025
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Review8 Mar 2025
- 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questions20 Feb 2025
- 2025Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projects4 Feb 2025
- 2025Security and Quality in LLM-Generated Code: A Multi-Language, Multi-Model Analysis3 Feb 2025
- 2025Iterative Label Refinement Matters More than Preference Optimization under Weak Supervision14 Jan 2025
- 2025Cyber Shadows: Neutralizing Security Threats with AI and Targeted Policy Measures3 Jan 2025
- 2024Trust Calibration in IDEs: Paving the Way for Widespread Adoption of AI Refactoring20 Dec 2024
- 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Security19 Dec 2024
- 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarios16 Oct 2024
- 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Data10 Sep 2024
- 2024Understanding Defects in Generated Codes by Language Models23 Aug 2024
- 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?20 Aug 2024
- 2024Prompting Techniques for Secure Code Generation: A Systematic Investigation9 Jul 2024
- 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generation7 Jul 2024
- 2024Toward Secure Code Generation: Bridging Correctness and Security via Task-Adaptive Vulnerability Modeling and Execution-Based Benchmarking2 Jul 2024
- 2024Transforming Software Development: Evaluating the Efficiency and Challenges of GitHub Copilot in Real-World Projects25 Jun 2024
- 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forward11 Jun 2024
- 2024Morescient GAI for Software Engineering (Extended Version)7 Jun 2024
- 2024Evaluation of the Programming Skills of Large Language Models23 May 2024
- 2024Automatic Programming: Large Language Models and Beyond3 May 2024
- 2024An Investigation into Misuse of Java Security APIs by Large Language Models4 Apr 2024
- 2024Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answers22 Mar 2024
- 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practices19 Mar 2024
- 2024Bugs in Large Language Models Generated Code: An Empirical Study13 Mar 2024
- 2024Generative AI Security: Challenges and Countermeasures20 Feb 2024
- 2024Calibration and Correctness of Language Models for Code3 Feb 2024
- 2024Human-Centered Privacy Research in the Age of Large Language Models3 Feb 2024
- 2024An Empirical Study on Usage and Perceptions of LLMs in a Software Engineering Project29 Jan 2024
- 2024Risk Taxonomy, Mitigation, and Assessment Benchmarks of Large Language Model Systems11 Jan 2024
- 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Models1 Jan 2024
- 2023Breaking the Silence: the Threats of Using LLMs in Software Engineering13 Dec 2023
50 newest of 63 All 63 (JSON)
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agentscited by 17
- 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarioscited by 16
- 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarioscited by 14
- 2026AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Developmentcited by 10
- 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?cited by 7
- 2026Do These Violent Delights Have Violent Ends? Measuring the Post-Merge Fate of Agentic Codecited by 0
- 2026A Few Pages of Markdown: Committed AI Configuration and Lower Quality Cost after Coding-Agent Adoptioncited by 0
- 2026A Few Pages of Markdown: Committed AI Configuration and Lower Quality Cost after Coding-Agent Adoption26 Aug 2026
- 2026Do These Violent Delights Have Violent Ends? Measuring the Post-Merge Fate of Agentic Code10 Jul 2026
- 2026AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Development20 Jan 2026
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agents6 Nov 2025
- 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarios16 Mar 2025
- 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarios16 Oct 2024
- 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?20 Aug 2024
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
- 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
- 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
- 2024Risk Taxonomy, Mitigation, and Assessment Benchmarks of Large Language Model Systemscited by 63
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 52
- 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
- 2024Calibration and Correctness of Language Models for Codecited by 49
- 2023Large Language Models and Simple, Stupid Bugscited by 45
- 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forwardcited by 44
- 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practicescited by 36
12 most cited of 53 All 53 (JSON)
- 2026Vibe Coding and Web Application Security: A Twin-Prompt Study21 Aug 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026Understanding the Impact of AI Code Assistants on Security API Usage: An Empirical Study13 Jul 2026
- 2026Enhancing Reliability in LLM-Based Secure Code Generation22 May 2026
- 2026Security of LLM-generated Code: A Comparative Analysis21 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026Accountable Agents in Software Engineering: An Analysis of Terms of Service and a Research Roadmap6 May 2026
- 2025Unsupervised Elicitation of Language Models11 Jun 2025
- 2025The Scales of Justitia: A Comprehensive Survey on Safety Evaluation of LLMs6 Jun 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025
- 2025SandboxEval: Towards Securing Test Environment for Untrusted Code27 Mar 2025
- 2025Conformal Prediction Sets for Deep Generative Models via Reduction to Conformal Regression13 Mar 2025
12 newest of 53 All 53 (JSON)