The use of AI coding assistants is on the rise, and while they can juice a developer's productivity, they also threaten the quality and security of software development, a recent study analyzing millions of lines of code has found.
The Apiiro team's research, based on first-party data from dozens of enterprises in the financial services, industrial manufacturing, and technology sectors, noted that the rise of generative AI coding assistants such as GitHub Copilot has dramatically increased code creation velocity in the past two years — even as the productivity of developers has remained steady.
However, with that accelerated velocity comes significant security risks, including a threefold surge in repositories containing personally identifiable information (PII) and payment data, a tenfold increase in APIs missing authorization and input validation, and a growing number of exposed sensitive API endpoints. "As AI-generated code scales, so do application security risks, underscoring the need for stronger risk detection and governance," the report noted.
The use of AI assistants is becoming routine for developers. Beth Linker, a senior director at Black Duck Software, noted that in Black Duck's 2024 Global State of DevSecOps report, about nine out of 10 organizations surveyed reported that their developers were using AI coding tools — with or without permission. The Apiiro report said that since the launch of ChatGPT in November 2022, more than 150 million developers AI code assistants have risen using GitHub Copilot.
Here's what you need to know about key factors in balancing developer productivity with rise in risk from AI assistants — including the next generation of agentic AI.
[ Get White Paper: How the Rise of AI Will Impact Software Supply Chain Security ]
Pull requests and productivity: Mixed signals
The code surge is further supported by a rising number of pull requests, the Apiiro report found. Since the second half of 2022, pull requests have increased by 70%. That's notable because it outpaces both the 30% growth in AI repositories and the 20% increase in developers, said Stefan Leichenauer, vice president of engineering at SandboxAQ.
“Pull requests are the basic unit of productivity for developers. When a developer completes a task, they issue a pull request to have their work incorporated into the larger software project. So an increasing number of pull requests means that more things are getting done.”
—Stefan Leichenauer
While you might expect more pull requests to be correlated with a more productive software development team, Leichenauer said it only translates into more AI use. “Unless there's some other reason to believe that your team is becoming more productive, more pull requests probably mean they are making use of tools like AI assistants,” he said.
Walter Haydock, founder and CEO of StackAware, said an increase in pull request velocity doesn't necessarily mean AI coding assistants are being widely used by developers, but that is a potential explanation. “By generating code more rapidly, especially for boilerplate or easily predictable functions, developers can submit changes faster than without these copilots,” he said.
“With that said, more pull requests don't necessarily mean greater productivity. If developers write unnecessarily complex or repetitive code with AI assistants, increased pull request velocity could actually represent a loss in productivity.”
—Walter Haydock
On the other hand, Haydock said, if the overall size of a codebase shrinks while existing tests pass — suggesting there was no loss in functionality or the addition of new bugs — then AI assistants could be driving productivity gains.
The appeal of AI coding assistants — and why risk is rising
AI coding assistants appeal to developers by offering an interactive way to quickly generate boilerplate code, and generally save time writing code that is necessary but not novel, explained Josh Buker, a research analyst with the Cloud Security Alliance.
Stephen Kowski, field CTO at SlashNext, said AI assistants dramatically boost productivity by automating repetitive coding tasks and generating code snippets that would otherwise require time-consuming research.
"They serve as virtual pair programmers, offering intelligent suggestions and helping developers learn new programming languages faster."
—Stephen Kowski
That idea has been incorporated into a course on AI-assisted development at Duke University, Kowski said. It teaches students Rust, from fundamentals to advanced concepts, with the assistance of AI. "These tools allow developers to complete tasks much faster, letting them focus on more creative and complex aspects of software development," he said.
But AI-juiced productivity comes with a price. For example, the Apiiro report noted that the number of APIs that expose sensitive data nearly doubled as code volume surged. Dwayne McDaniel, a developer advocate with GitGuardian, isn't surprised by that because developers are trusting the output of AI assistants to speed up their work, though the trust is mislaid.
“The largest drawback to a code assistant trained on all the code on GitHub is that there is a lot of terrible code on GitHub. At best, these assistants are going to be mediocre for security best practices.”
—Dwayne McDaniel
McDaniel's answer: As with most AI issues, give humans more oversight, in this case to improve the pull request process. “When code is pushed, that is the perfect time for introspection and teaching," he said. "Rather than focusing on more and more [continuous integration] pushes, teams have the opportunity to make each code review an event where knowledge is passed on and where we see real personal gains in coding know-how.”
“Teaching someone the right way to do something versus just correcting AI output endlessly is the real path ahead if we are going to have a new generation of senior developers in the future."
—Dwayne McDaniel
Missing authorization and input validation
Tim Erlin, a security strategist with Wallarm, said sensitive data leakage is a serious problem with APIs, one that is challenging to address with AI automation. While it’s not difficult to detect sensitive data in an API, it can be difficult to understand if that sensitive data should be there, he said.
“If I’m writing an API for banking, I expect it to contain sensitive data, but narrowing down the specific API endpoints where that’s acceptable versus where it’s not is hard. The key to solving this problem is connecting the APIs to business flows so that automation can identify when sensitive data appears in an inappropriate business context.”
—Tim Erlin
The Apiiro survey also found a tenfold jump over the last year in repositories containing APIs with missing authorization and input validation — and that translates into risky code, said Erich Kron, a security awareness advocate at KnowBe4.
“If the AI agent hasn't learned the proper way to handle authorization and authentication protocols in the way needed for particular applications, it can generate code that allows these problems with authorization and input validation. The more the developers rely on the AI agents, especially if they are flawed, the more prevalent this problem is going to become."
—Erich Kron
SlashNext's Kowski said that AI code assistants often generate functional but insecure code that lacks proper authorization checks and input validation because they're trained to prioritize working solutions over secure ones.
“Many developers, especially those with limited security expertise, trust the AI-generated code without critically evaluating security implications, creating a false sense of confidence in code that may contain serious vulnerabilities."
—Stephen Kowski
Kowski said organizations should consider implementing mandatory security reviews for AI-generated code, deploy automated API security testing tools that specifically check for missing authorization and input validation, and provide developers with targeted training on recognizing and fixing these specific vulnerabilities.
Code churn means PII trouble
The Apiiro researchers also reported a threefold increase in repositories containing PII and payment data since 2023. SandboxAQ's Leichenauer said an AI assistant is not likely to understand which kinds of data are sensitive and which kinds are not, or they may not appreciate all the ways that PII can leak.
“If a developer is not paying attention to what's going on, they may accept AI suggestions that include risky bits of code, such as APIs that can expose sensitive data.”
—Stefan Leichenauer
Kowski said AI assistants often handle sensitive data inefficiently, storing PII and payment information in repositories without proper encryption or access controls. Developers using these tools may not recognize when the generated code is inappropriately storing or exposing sensitive data, especially when the AI makes seemingly reasonable suggestions that actually violate data protection best practices, he said.
“The rapid pace of development enabled by AI tools means security reviews can't keep up with code generation, allowing sensitive data-handling mistakes to proliferate across multiple repositories before they're detected.”
—Stephen Kowski
After analyzing 211 million changed lines of code for its 2025 AI Code Quality report, the software engineering platform GitClear concluded that “code is becoming more churned and duplicated than ever.”
GitClear wrote in a LinkedIn posting:
“Managers would never let a junior developer join their team and start pouring in thousands of lines of copy/paste or duplicated code blocks, but when that sort of code is authored by AI, even smart CTOs and VPs of engineering seem OK letting AI-generated code agents dominate their repo activity (not to mention their tools budget)."
Getting the balance of productivity and risk right is key
Chris Hughes, CISO and co-founder of Aquia, recently queried security peers on LinkedIn: “We may be seeing a productivity boon, but if it is at the expense of quality and stability, is it worth it?" Hughes wrote. Considering that these models are largely trained on open-source codebases, which include vulnerabilities and defects, organizations should expect an exponential growth in vulnerabilities, he said. "[We] already have been seeing double-digit YoY CVE/vulnerability growth before the explosion of copilot tools.”
“Organizations are already drowning in vulnerability backlogs in the hundreds of thousands to millions with no end in sight and an inability to keep up remediation. The attack surface is likely to get even worse.”
—Chris Hughes
Hughes' advice: “Buckle up.”
Keep learning
- Go big-picture on the software risk landscape with RL's 2025 Software Supply Chain Security Report. Plus: Join our Webinar to discuss the findings.
- Get up to speed on securing AI/ML with our white paper: AI Is the Supply Chain. Plus: See RL's research on nullifAI and join our Webinar to learn how RL discovered the novel threat.
- Learn how commercial software risk is under-addressed: Download the white paper — and see our related Webinar for more insights.
Explore RL's Spectra suite: Spectra Assure for software supply chain security, Spectra Detect for scalable file analysis, Spectra Analyze for malware analysis and threat hunting, and Spectra Intelligence for reputation data and intelligence.