AI coding assistants (LLMs) dramatically increase developer velocity, but introduce critical new AppSec risks. AI-generated code is consistently less secure.
March 18, 2026

AI coding assistants have become standard-issue tools in modern software development. According to a recent developer survey of 49,000 respondents, 84% of developers now use these tools, with more than half relying on them daily. The speed gains are real. So are the security consequences — and most engineering teams are not prepared for the tradeoff they have already accepted.
AI coding assistants (LLMs) dramatically increase developer velocity but introduce critical new AppSec risks. AI-generated code is consistently less secure, featuring higher rates of XSS, SQL injection, and architectural flaws. The key security vulnerabilities concentrate in three areas:
To mitigate this, engineering leaders must:
An AI coding assistant is a developer tool that uses large language models (LLMs) to generate, autocomplete, refactor, or explain code inside an IDE or code editor. GitHub Copilot, Amazon CodeWhisperer, Cursor, Claude Code, and Tabnine are among the most widely adopted. These tools accelerate development cycles, reduce boilerplate, and lower the barrier for developers working outside their primary language. But as adoption has scaled, so has the volume of insecure code reaching production — creating a widening gap between development velocity and security coverage that engineering leaders can no longer afford to ignore.
Kusari Inspector, AI code review and dependency management, provides inline PR security analysis covering direct and transitive dependencies, known vulnerabilities ranked by CVSS severity and EPSS exploit likelihood, typosquatted dependency names, GitHub workflow security issues, secrets detection, and license compliance — all within the developer's existing workflow.
As AI coding tools become standard in open source development, Kusari Inspector serves as the safety net maintainers didn't know they needed. “I used Claude to submit a pull request to go-witness,” said John Kjell, a maintainer of in-toto/Witness. “Kusari Inspector found an issue that Claude didn’t catch. When I asked Claude to fix what Kusari Inspector flagged, it did.”
This article breaks down what that gap looks like in practice, where the risks concentrate, and what organizations should do about it before the debt compounds further.
The promise of AI coding assistants in 2026 is well-documented. Developers ship faster. Boilerplate vanishes. Onboarding to unfamiliar codebases takes less time. Some teams report completing tasks in a quarter of the time previously required.
But research from Apiiro, published in September 2025, found that AI-generated code introduced over 10,000 new security findings per month across the repositories they studied — a 10× spike in just six months. And the curve was accelerating, not flattening. Trivial syntax errors dropped, but deep architectural flaws surged: privilege escalation paths jumped 322%, and architectural design flaws spiked 153%.
CodeRabbit's analysis of AI-authored versus human-authored pull requests tells a similar story. AI-generated code produced 1.75× more logic and correctness errors, 1.57× more security findings, and was 2.74× more likely to introduce cross-site scripting (XSS) vulnerabilities.
But even as these risks mount, Kusari's "Application Security in Practice" report reveals a telling disconnect in how teams prioritize their security tooling. Developers want suggested fixes (48% "must have") and automated PR scanning (39%) — but AI analysis and recommendations lands at just 9% "must have." The full breakdown shows where confidence runs high and where it drops off:
The pattern is clear: teams trust manual-trigger and human-reviewed security workflows, but remain skeptical of AI-driven analysis — even while relying heavily on AI coding assistants to write the code those workflows need to check. That gap between AI adoption in development and AI confidence in security is the central tension engineering leaders need to resolve.
For more insights Get the [2026 AppSec Research Report here]
Kusari's own "Application Security in Practice" report, based on a survey of developers and security professionals at mid-sized organizations, found that 85% of respondents use AI coding assistants — but only 38% apply AI to support code review in pull requests, where security feedback is most actionable. Just 9% consider AI-driven security analysis a "must have" capability.
The productivity-vs.-security tradeoff is no longer a thought experiment for engineering leaders evaluating the best AI coding assistants for their teams. It is an operational reality with measurable downstream costs.
Understanding the risks of AI coding assistants requires looking beyond "insecure code" as a monolith. The vulnerabilities cluster in specific, predictable patterns that traditional security tooling often misses.
LLMs learn from vast repositories of open source code. If an insecure pattern — say, string-concatenated SQL queries — appears frequently in the training corpus, the model will reproduce it. The Cloud Security Alliance (CSA) and Endor Labs found that 62% of AI-generated code contains design flaws or known vulnerabilities. Veracode's 2025 analysis reported that 45% of AI-generated code was vulnerable per the OWASP Top 10 (a widely referenced standard ranking the most critical web application security risks). Java had a particularly high failure rate, exceeding 70% for secure code generation.
These are not exotic edge cases. They are common CWE (Common Weakness Enumeration) patterns — SQL injection (CWE-89), cross-site scripting (CWE-79), privilege escalation, insecure deserialization — showing up at scale because the models optimize for functional correctness, not security.
One of the most novel AI coding assistant risks involves package hallucinations. A 2025 study published at USENIX Security Symposium analyzed 576,000 code samples across 16 LLMs and found that nearly 20% of recommended packages did not exist. Open source models hallucinated at roughly 22%, while commercial tools like GPT-4 still produced phantom dependencies about 5% of the time.
Attackers have taken notice. By registering malicious packages under hallucinated names on public registries like PyPI and npm, they create what security researchers call "slopsquatting" — a supply chain attack vector that weaponizes AI-generated recommendations. The danger compounds because 43% of hallucinated package names repeat consistently across multiple queries, making them predictable targets for exploitation.
For organizations already struggling with software supply chain visibility, hallucinated dependencies represent a new class of inherited risk that conventional SCA tools were not designed to detect.
AI-generated code frequently lacks defensive programming constructs. It delivers endpoints that accept user input without validation, sanitization, or authorization checks — not because the model is deliberately insecure, but because the prompt never specified those requirements. Perry et al.'s research demonstrated that developers using AI assistants wrote "significantly less secure code" and exhibited a "false sense of security," often rating their insecure solutions as secure.
This behavioral shift matters as much as the technical flaws. When developers trust AI-generated code at face value, the human review layer that historically caught these omissions degrades.
GitHub Copilot holds the largest market share among AI coding assistants. Microsoft reported that Copilot is used by 90% of Fortune 100 companies, with over 20 million users as of mid-2025. That scale makes its security properties worth examining closely.
GitGuardian's research found that 6.4% of repositories using GitHub Copilot leak at least one secret — 40% higher than the 4.6% baseline in repositories without AI assistance. In 2025, security researchers also discovered that attackers could inject malicious instructions into configuration files used by Cursor and GitHub Copilot, causing these tools to silently generate backdoored code. GitHub responded by implementing warnings for hidden Unicode text in May 2025, but the underlying vulnerability — prompt injection at the system level — remains an open challenge across AI code review tools in 2026.
Microsoft itself patched 1,139 CVEs in 2025, the second-largest year by volume. The company has acknowledged that 30% of code in certain repositories was written by AI. As one Trend Micro researcher noted, as AI-generated code volume increases, so will the associated vulnerability count.
The lesson for engineering leaders is straightforward: GitHub Copilot security is not a configuration problem. It is a workflow design challenge that requires structural guardrails, not just policy memos.
The rise of "vibe coding" — a development approach where programmers describe what they want in natural language and trust AI to handle the actual implementation — has accelerated development but weakened the feedback loops that catch security issues. When code feels effortless to produce, the incentive to carefully review it drops.
Cortex's "Engineering in the Age of AI: 2026 Benchmark Report" found that while pull requests per author increased 20% year-over-year, incidents per pull request rose 23.5%, and change failure rates climbed around 30%. More code is shipping, but more of it is breaking.
Kusari's research reinforces this pattern. Two-thirds of surveyed teams spend up to 20 hours per week responding to software supply chain security incidents. More than half report code security review and approval times of two to five days. The reactive posture drains developer capacity without meaningfully reducing risk.
AI coding assistants magnify this dynamic. They increase the throughput of code that needs review while simultaneously lowering the perceived urgency of that review. For security teams already stretched thin, the math does not work.
Not all AI code review tools address the same problems. Engineering leaders evaluating options in 2026 should distinguish between tools that check syntax and style versus those that assess security posture, dependency health, and supply chain integrity.
Effective security-focused code review should include:
Static application security testing (SAST) integrated into the PR workflow. Security feedback needs to arrive where developers already work — inside the pull request — not in a separate dashboard they check once a week.
Software composition analysis (SCA) that maps transitive dependencies. Direct dependency scanning is table stakes. The real blind spot is nested dependencies, where Kusari's research found that only 28% of organizations have strong visibility.
AI-specific scanning for hallucinated or malicious packages. Traditional SCA tools check known packages against vulnerability databases. They do not detect phantom dependencies that AI tools invent, nor do they flag newly registered packages with no history.
SBOM generation tied to code changes. Capturing a Software Bill of Materials at the PR level creates an auditable record of what enters the codebase and when — essential for incident response and compliance with emerging regulations like the EU Cyber Resilience Act.
Managing AI coding assistant risks does not require banning the tools. It requires redesigning the workflow around them. Based on industry research and Kusari's survey data, the following steps address the highest-impact gaps:
Treat AI-generated code as untrusted input. Every line produced by an AI coding assistant should pass through the same security checks as code from an unknown contributor. Automated scanning on every PR — not weekly or at milestones — is the minimum standard.
Close the review gap. The disparity between 85% adoption of AI coding assistants and 38% use of AI in code review represents an enormous unaddressed attack surface. Integrating security feedback directly into the development workflow, rather than operating it as a separate process, is the single most impactful change most organizations can make.
Map your transitive dependencies. Visibility into deeply nested dependency layers is critical for detecting inherited vulnerabilities, including those introduced through hallucinated packages. SCA tooling that stops at direct dependencies leaves the majority of the supply chain unmonitored.
Consolidate to specialized, well-integrated tools. Kusari's report found that tool sprawl — layering more interfaces without proportional security gains — exacerbates friction and context switching. Two or three focused solutions that integrate cleanly through common interfaces (PR comments, SBOMs, shared pipelines) are more effective than broad, all-in-one platforms.
Establish shared ownership. Security teams often "own" AppSec reviews, but this model creates bottlenecks. Moving day-to-day secure code delivery responsibilities closer to development — while security teams focus on standards, monitoring, and escalations — reduces handoffs and accelerates response.
Risk levels vary across programming languages, AI models, and organizational context. Java and C consistently show higher vulnerability rates in AI-generated output than Python, according to multiple 2025 studies. Commercial models like GPT-4 hallucinate packages at roughly 5%, compared to over 20% for some open source models. Organizations with mature DevSecOps practices and existing automated scanning pipelines will find these recommendations easier to adopt, while teams with limited tooling may need to prioritize the review gap and dependency visibility steps first.
AI coding assistants are not going away, and their influence on codebases will only grow. Cursor alone reported generating one billion lines of committed code per day by April 2025. The organizations that thrive will be those that build security into the AI-assisted development workflow rather than bolting it on after the fact.
The data is clear: speed without scrutiny is an open invitation to attackers. The best AI coding assistants make developers faster, but they do not make code safer by default. That responsibility still falls on the teams, tools, and processes surrounding them.
Ready to close the gap between AI-assisted development and software supply chain security? Request a demo of Kusari to see how Kusari Inspector and the Kusari Platform bring security directly into your PR workflow — without slowing down your developers.
The biggest security risks of AI coding assistants fall into three categories: reproducing insecure patterns from training data (SQL injection, XSS, privilege escalation), hallucinating non-existent packages that attackers can weaponize through slopsquatting, and omitting defensive controls like input validation because prompts do not specify them. Research also shows developers using AI assistants tend to exhibit a "false sense of security," reducing the effectiveness of human review.
AI coding assistants affect software supply chain security by increasing code volume and velocity while introducing novel risk vectors — hallucinated dependencies, insecure inherited patterns, and reduced review scrutiny. Kusari's research found that 85% of developers use AI coding assistants but only 28% have strong visibility into transitive dependency layers, meaning most organizations cannot track the full chain of components their AI-assisted code relies on.
GitHub Copilot security for enterprise use depends on the guardrails surrounding it, not the tool alone. GitGuardian found that repositories using Copilot have a 40% higher rate of secret leakage compared to those without AI assistance. Security researchers also demonstrated prompt injection vulnerabilities in Copilot during 2025. Enterprise teams can use Copilot productively, but they should treat its output as untrusted, integrate automated security scanning on every pull request, and deploy SCA tools that detect both known vulnerabilities and hallucinated dependencies.
Slopsquatting is a supply chain attack where threat actors register malicious packages under names that AI coding assistants commonly hallucinate. A 2025 study found that nearly 20% of packages recommended by LLMs did not actually exist, and 43% of those hallucinated names repeated consistently across queries. Developers should care because installing a hallucinated dependency could silently introduce malware into their codebase. Verifying packages against official registries and using dependency scanning tools that flag unknown or newly registered packages are essential countermeasures.
Engineering leaders can balance AI coding productivity with security by treating AI-generated code as untrusted input that requires automated security validation on every pull request. Integrating SAST and SCA tools directly into the PR workflow catches issues before merge. Mapping transitive dependencies provides visibility into inherited risks. Consolidating to a small set of specialized, well-integrated security tools — rather than adding more dashboards — reduces friction while improving coverage. The goal is not to slow developers down but to build security into the same workflow where the code is produced.
Organizations evaluating AI code review tools in 2026 should prioritize tools that operate within the pull request workflow rather than in standalone dashboards. Key capabilities include static analysis for common vulnerability patterns, software composition analysis covering both direct and transitive dependencies, detection of hallucinated or typosquatted packages, secrets scanning, SBOM generation, and risk prioritization based on exploit likelihood (EPSS) and severity (CVSS). Tools like Kusari Inspector are built around this model, providing inline PR analysis that gives developers actionable go/no-go recommendations without requiring context switches.
Teams should scan AI-generated code for vulnerabilities on every pull request, at minimum. Kusari's research found that organizations with the best security outcomes check daily or on every PR and set expectations for same-day or next-day security feedback. Scanning only at milestones or monthly intervals allows vulnerabilities to accumulate, making remediation more complex and costly. Automated, continuous scanning is essential because the volume of AI-generated code makes manual-only review mathematically unsustainable.
Using AI coding assistants does introduce compliance risks under frameworks like the EU Cyber Resilience Act, NIST SSDF, and FDA cybersecurity requirements for medical devices. These regulations increasingly require supply chain transparency through SBOMs, provenance tracking, and vulnerability management for all software components — including those generated or recommended by AI. Organizations that cannot trace the origin and security posture of AI-generated dependencies face audit exposure and potential penalties.
No older posts
No newer posts