mlsanityData to 7 Oct 2026

Is GitHub's Copilot as Bad as Humans at Introducing Vulnerabilities in Code?

arXiv 2204.04741 ↗First posted 10 Apr 2022cs.SE cs.CRcited by 63

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 2; 2023: 12; 2024: 24; 2025: 14; 2026: 11.

63 papers.

Sort:

By area:

  1. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
  2. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
  3. 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
  4. 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
  5. 2024Risk Taxonomy, Mitigation, and Assessment Benchmarks of Large Language Model Systemscited by 63
  6. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
  7. 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 52
  8. 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
  9. 2024Calibration and Correctness of Language Models for Codecited by 49
  10. 2023Large Language Models and Simple, Stupid Bugscited by 45
  11. 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forwardcited by 44
  12. 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practicescited by 36
38 more
  1. 2024Automatic Programming: Large Language Models and Beyondcited by 35
  2. 2024Prompting Techniques for Secure Code Generation: A Systematic Investigationcited by 33
  3. 2024An Empirical Study on Usage and Perceptions of LLMs in a Software Engineering Projectcited by 28
  4. 2024Toward Secure Code Generation: Bridging Correctness and Security via Task-Adaptive Vulnerability Modeling and Execution-Based Benchmarkingcited by 26
  5. 2025The Scales of Justitia: A Comprehensive Survey on Safety Evaluation of LLMscited by 24
  6. 2024Astraios: Parameter-Efficient Instruction Tuning Code Large Language Modelscited by 23
  7. 2023Is AI the better programming partner? Human-Human Pair Programming vs. Human-AI pAIr Programmingcited by 20
  8. 2024Transforming Software Development: Evaluating the Efficiency and Challenges of GitHub Copilot in Real-World Projectscited by 18
  9. 2025Security and Quality in LLM-Generated Code: A Multi-Language, Multi-Model Analysiscited by 18
  10. 2023Semantic Compression With Large Language Modelscited by 17
  11. 2025Agentic Refactoring: An Empirical Study of AI Coding Agentscited by 17
  12. 2023CrossCodeBench: Benchmarking Cross-Task Generalization of Source Code Modelscited by 16
  13. 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarioscited by 16
  14. 2023Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigationcited by 14
  15. 2024HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training Datacited by 14
  16. 2025Beyond Final Code: A Process-Oriented Error Analysis of Software Development Agents in Real-World GitHub Scenarioscited by 14
  17. 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 13
  18. 2024Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answerscited by 12
  19. 2024An Investigation into Misuse of Java Security APIs by Large Language Modelscited by 11
  20. 2025Unsupervised Elicitation of Language Modelscited by 11
  21. 2025Conformal Prediction Sets for Deep Generative Models via Reduction to Conformal Regressioncited by 10
  22. 2025SandboxEval: Towards Securing Test Environment for Untrusted Codecited by 10
  23. 2026AI IDEs or Autonomous Agents? Measuring the Impact of Coding Agents on Software Developmentcited by 10
  24. 2023Can ChatGPT Pass An Introductory Level Functional Language Programming Course?cited by 9
  25. 2024Human-Centered Privacy Research in the Age of Large Language Modelscited by 9
  26. 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
  27. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
  28. 2025Do LLMs Consider Security? An Empirical Study on Responses to Programming Questionscited by 8
  29. 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?cited by 7
  30. 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
  31. 2025Iterative Label Refinement Matters More than Preference Optimization under Weak Supervisioncited by 5
  32. 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Reviewcited by 5
  33. 2024Generative AI Security: Challenges and Countermeasurescited by 4
  34. 2024Understanding Defects in Generated Codes by Language Modelscited by 4
  35. 2025Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projectscited by 4
  36. 2026Accountable Agents in Software Engineering: An Analysis of Terms of Service and a Research Roadmapcited by 3
  37. 2024Evaluation of the Programming Skills of Large Language Modelscited by 2
  38. 2024Morescient GAI for Software Engineering (Extended Version)cited by 1

50 most cited of 63 All 63 (JSON)