চফ্টৱেৰ ইঞ্জিনিয়াৰিং • 13 min read • By Codexal Engineering Team

ভাইব কোডিং ২০২৬: পৰিসংখ্যা, সুৰক্ষা ঋণ, আৰু AI-এ লিখা কোড নিৰাপদে প্ৰকাশ কৰাৰ উপায়

Nearly half of all new code is written by a model, almost no developer fully trusts it, and barely half of them read it before committing. Vibe coding is not a fad to wait out — it is a process change that arrived without its safeguards. Here is the data, and the controls that close the gap.

Vibe coding 2026 — AI-generated code statistics, security vulnerabilities and review controls

Vibe coding is building software by describing what you want and accepting what comes back without reading most of it. The term was coined in early 2025 for steering an AI coding tool by feel — prompt, run, see if it works, prompt again. The defining property is not that a model wrote the code. It is that no human read it.

That distinction is the whole subject of this article, because every safeguard software engineering has — code review, on-call, incident response, security sign-off — silently assumes somebody understands the system. Remove that assumption and the safeguards keep running as rituals while the thing they protect is gone.

None of what follows is an argument for refusing AI tools. They work, they are now universal, and the productivity is real for the kind of work they are good at. The argument is narrower and more useful: the failure mode is specific, measurable, and fixable with controls most teams already know how to run.

~46%of new code on GitHub is AI-generated in 2026
~1.7×more issues than comparable human-written code
~45%of generated samples fail OWASP Top 10 security benchmarks
96% / 48%don't fully trust AI code / always review it before committing

Figures are the mid-range of 2026 published assessments of AI-generated code volume, vulnerability rates, security benchmark pass rates and developer review behaviour. Methodologies differ and the numbers are contested at the margins; the direction is not.

What vibe coding is
Prompting software into existence and shipping it without reading the code
What it is not
AI-assisted development, where the engineer still reads and owns the diff
Where it is fine
Prototypes, internal throwaway tools, scripts, synthetic data, anything disposable
Where it is dangerous
Authentication, authorisation, payments, personal data, infrastructure, multi-tenant boundaries
The actual mechanism of harm
The review gap — known unreliability plus inconsistent review
Weakest vulnerability classes
Broken access control, injection, hardcoded secrets, weak crypto, missing authorisation on new endpoints
The cheapest effective control
Mandatory human review on any diff touching auth, money, data access or external input

1. What vibe coding actually means

The word has drifted into meaning "using AI to code", which makes the conversation useless. The useful definition is about authorship, not tooling:

  AI-assisted development Vibe coding
Who is the author? The engineer — they read it and own it Nobody — the requester never read it
Can a human explain the diff? Yes No
Verification Review plus tests "It works when I click it"
Failure discovered In review In production, by someone else
Appropriate for Anything Disposable work only

The same tool, the same prompt and the same generated file can land in either column. The variable is what the human does next. That is good news, because it means the fix is a process change you control rather than a model property you wait on.

2. The 2026 data, in one place

Independent assessments published through 2026 agree on the shape even where they disagree on decimals.

Measure 2026 figure What it means in practice
Share of new code AI-generated ~46%, trending toward 60% This is not an edge case in your codebase; it is the majority case
Developers using AI tools regularly Over 90% A ban is unenforceable; governance is the only option
Issue rate vs human-written code ~1.7× more Volume up and defect density up means a multiplied review load
Samples failing OWASP security benchmarks ~45% Nearly half of generated security-relevant code is wrong in a known way
Average security pass rate Low 60s % Improving year over year, nowhere near "ship unreviewed"
Vibe-coded apps with ≥1 hallucination-traceable vulnerability Over 90% in one 200+ app assessment Unreviewed AI apps are vulnerable by default, not occasionally
Don't fully trust AI code / always review it 96% / 48% The gap between those two numbers is the risk
Read the two numbers together:

A 1.7× defect rate on 46% of code is survivable with review. A 1.7× defect rate on 46% of code with review happening half the time is how a quiet backlog of access-control bugs gets built, and it will not be discovered by the tests the same model wrote.

3. The review gap is the whole problem

96% of developers say they do not fully trust AI-generated code. 48% say they always review it before committing. Those two facts cannot both be acted on rationally, and the second one is what ships.

Why does review erode? Three mechanisms, all predictable:

  • Volume. A model produces a 400-line diff in twenty seconds. Reviewing it properly takes forty minutes. The economics of attention lose, every time, on every team, unless the diff size is governed.
  • Plausibility. AI code looks like good code. It is idiomatic, consistently formatted, well-named and commented. Human bad code looks bad, which is a safety feature we have lost.
  • Base rate. It is usually right, so attention calibrates to "usually right", so the unusual case passes. This is the same mechanism behind every automation-complacency accident in every other industry.

None of those are character flaws. They are properties of the situation, which means they respond to structure — small diffs, blocking gates, review scoped to the files that matter — and not to exhortation.

4. How AI-generated code fails, specifically

The vulnerability classes repeat so consistently that they function as a review checklist.

1 Broken access control

The model adds an endpoint and implements the happy path. It fetches the record by id and returns it — without checking that the caller owns it. This is the single most common serious finding, and it passes every functional test, because the test uses the owner's session.

2 Injection

String-built queries and shell commands appear whenever the surrounding code does not already demonstrate a parameterised pattern. Models imitate the local style; in a mixed codebase they imitate the worst example available.

3 Hardcoded secrets and permissive defaults

API keys inlined "for now", CORS set to *, debug mode on, verbose errors returned to the client, storage buckets public. These come from the model optimising for the thing that makes the demo work.

4 Hallucinated dependencies

An import of a package that does not exist — which is a supply-chain problem the moment somebody registers that name. Lockfiles and allowlists, not vigilance, are the control.

5 Weak or wrong cryptography

Outdated hashes for passwords, home-rolled token signing, missing verification on the verify step. The code runs; the guarantee does not exist.

6 Tests that assert the bug

Ask for tests after the implementation and you get tests written from the implementation. They pass, they add coverage, and they certify whatever the code happens to do. This is the most insidious item on the list because it produces a green pipeline over a broken behaviour.

5. Why models fail this way

Three structural reasons, and understanding them tells you where to aim review attention.

They optimise for working, not for safe. The objective during training and the reward in your prompt are both "make it run". Authorisation checks, rate limits and input validation make nothing run; they stop things running. They are invisible to the objective unless you ask for them.

They cannot see your threat model. Whether an endpoint is internal or internet-facing, whether tenants must be isolated, whether this field is regulated — none of that is in the file. The model infers it from context it does not have, which is a polite way of saying it guesses.

They imitate the codebase. This is genuinely useful and cuts both ways: a repository with strong patterns gets stronger output, and a repository with one old unparameterised query gets that pattern replicated into new files for the next year. Your existing code quality is now a multiplier, not just a condition.

The practical consequence:

Cleaning up your worst existing patterns is now a security control, not a tidiness project. Every bad example in the repo is a template the model will reuse. We wrote about the surrounding discipline in why shift-left testing matters.

6. Six controls that make it safe to ship

In descending order of effect per hour spent.

  1. Mandatory human review on sensitive paths. Any diff touching authentication, authorisation, payments, data access or handling of external input requires a named human approver who read it. Enforce with path-based review rules in your repository, so it is mechanical rather than cultural.
  2. Blocking security gates in CI. SAST, dependency vulnerability scanning and secret detection on every pull request, failing the build rather than filing a report. A report that does not block is a report nobody reads.
  3. Specification-first tests. Write or generate tests from the requirement before the implementation exists, so they cannot be written from the code. For anything security-relevant, add the negative case explicitly: the wrong user, the missing token, the oversized input.
  4. A conventions file the tool reads. An AGENTS.md or equivalent at the repository root stating the ORM to use, the auth helper that must wrap every handler, the logging rules, the things never to do. Most "the AI ignores our standards" complaints are a missing file — the tool was never told.
  5. Diff size limits. Cap generated changes at something a person will genuinely read — a few hundred lines — and split larger work into sequenced tasks. This is the control that makes control #1 real instead of nominal.
  6. No production credentials in AI tooling. Agents and assistants get scoped, non-production credentials and a sandbox. A model that can reach production is a model one confused tool call away from an incident.

Every one of these is ordinary engineering hygiene. The reason they are missing is timing: teams adopt the AI tool in a week and the controls over a year, and the gap between those two is where the 2026 vulnerability data comes from.

7. A policy you can actually enforce

Policies written as "use AI responsibly" change nothing. Policies written by blast radius do. Three tiers, one page:

Green · unreviewed AI output fine

  • Prototypes and spikes
  • Internal throwaway tools
  • Scripts on synthetic data
  • Local developer tooling
  • Anything with no real data and no external access

Amber · review plus CI gates

  • Internal production services
  • Reporting and analytics paths
  • UI and presentation layers
  • Non-sensitive API endpoints
  • Infrastructure changes in non-prod

Red · named approver, tests first

  • Authentication and session handling
  • Authorisation and tenant isolation
  • Payments and financial logic
  • Personal and regulated data
  • Production infrastructure and IAM
  • Cryptography of any kind

Publish the tiers, map them to directories, and wire the red list into required-reviewer rules. A policy that lives in the repository configuration is a policy; one that lives in a wiki is a preference.

8. The comprehension debt nobody budgets for

Classic technical debt is code you know is bad. The debt AI creates is different and worse: code that works, that passes its tests, and that nobody in the building understands.

It compounds quietly. The first incident in an unexplained module starts with an hour of archaeology before anyone can even form a hypothesis. The second one starts the same way, because the archaeology was never written down. Within a year you have a system where the cost of every change is dominated by rediscovering how it works.

Four unglamorous countermeasures:

  • A human must be able to explain every merged diff. Make that an explicit review criterion. "I don't fully follow this but the tests pass" is a request for changes.
  • Document decisions, not syntax. Why this approach, what was rejected, what constraint forced it. The model can regenerate the code; it cannot regenerate the reasoning.
  • Keep changes small. Comprehension scales with diff size far worse than linearly.
  • Treat an unexplainable module as a defect. Even a green one. Especially a green one.

9. Does it actually make teams faster?

Yes, selectively, and the selection is predictable. AI tools reliably reduce typing and unreliably reduce thinking — and software projects spend most of their time thinking.

Work type Realistic effect
Boilerplate, scaffolding, CRUD, migrations Large gain — this is the sweet spot
Unfamiliar syntax or a new library's surface Large gain — replaces documentation search
Tests for existing, well-understood behaviour Solid gain, with the specification-first caveat above
Mechanical refactors across many files Good gain where tests are fast enough to verify
Debugging deep or intermittent behaviour Mixed — useful for hypotheses, poor at conclusions
Novel architecture and system design Little to none; sometimes negative
Large unfamiliar codebase, high-stakes change Often negative once review and correction are counted

The teams getting the most from these tools are not the ones with the best prompts. They are the ones with fast tests, small changes and clear conventions — because those are the conditions under which generated code can be checked cheaply. AI tooling rewards a well-run codebase; it does not produce one.

10. The pre-merge checklist

Six questions for any diff a model wrote. They take two minutes and catch most of what the data says goes wrong.

  1. Authorisation: does every new read and write check that this caller is allowed, not just that the record exists?
  2. Input: is every externally supplied value validated and parameterised at the boundary?
  3. Secrets and defaults: any inlined keys, wildcard CORS, debug flags, verbose errors, public storage?
  4. Dependencies: does every new import exist, is it the package you meant, is it pinned?
  5. Tests: were they written from the requirement rather than the implementation, and is there a negative case?
  6. Comprehension: can you explain what this does and why, without rereading it?

A "no" on any of the first five is a request for changes. A "no" on the sixth is a request for a smaller diff.

Read next AI Coding Assistants in 2026: GitHub Copilot and the Alternatives Compared Which tool fits which kind of team — and what each one does about review, sandboxing and repository conventions.

11. Frequently asked questions

What is vibe coding?
Vibe coding is building software by describing what you want in natural language and accepting what the AI produces without reading most of it. The term was coined in early 2025 for the practice of steering an AI coding tool by feel — prompt, run it, see if it works, prompt again — rather than by reading and reasoning about the code. The defining feature is not that AI wrote the code; it is that a human did not review it.
Is vibe coding safe?
It is safe for throwaway work and unsafe for anything that handles other people's data or money. The risk is not that AI code is bad on average — much of it is competent — but that its failures are confident, plausible and concentrated in exactly the places that are hard to spot by testing: authorisation checks, input validation, secrets handling, and access control between tenants. A prototype nobody can reach is fine. A customer-facing endpoint built this way is a liability.
How much code is AI-generated in 2026?
The widely cited 2026 figures put AI-generated code at roughly 46% of new code on GitHub, projected to approach 60% by the end of the year, with over 90% of professional developers using AI coding tools regularly. Some AI-native companies report 70 to 90% of their own code being model-written. The direction is unambiguous even where the precise percentages are contested.
Does AI-generated code have more vulnerabilities?
Yes, consistently, across independent assessments in 2026. The commonly reported pattern is roughly 1.7x more issues than comparable human-written code, with around 45% of generated samples failing security benchmarks across the OWASP Top 10 categories, and security pass rates averaging in the low 60s percent. One 2026 assessment of over 200 vibe-coded applications found that more than 90% contained at least one vulnerability traceable to the model inventing something. The weak categories repeat: injection, broken access control, hardcoded secrets, weak cryptography, and missing authorisation on endpoints the model added.
What is the review gap?
The review gap is the distance between how much developers trust AI code and how much they check it. Surveys through 2026 found that about 96% of developers do not fully trust AI-generated code to be correct, while only about 48% always review it before committing. That combination — known unreliability plus inconsistent review — is the actual mechanism behind the vulnerability numbers. It is a process failure, not a model failure.
How do I make AI-generated code safe to ship?
Six controls, in order of leverage. Require human review for any diff that touches auth, payments, data access or external input. Run SAST, dependency and secret scanning in CI as a blocking gate, not a report. Require tests written against the specification rather than against the generated implementation. Give the AI tool a written conventions file so it stops inventing patterns. Keep diffs small enough to actually read. And forbid AI tools from running with production credentials. None of these are exotic; the failure is that teams adopt the AI tool in a week and the controls in a year.
What is the difference between vibe coding and AI-assisted development?
The code may be identical; the accountability is not. In AI-assisted development the engineer remains the author — they read the diff, understand it, and can defend it in review. In vibe coding the engineer is a requester and nobody has read the code at all. The distinction matters because every downstream safeguard, from code review to incident response, assumes somebody understands the system. Vibe coding quietly removes that assumption while leaving the safeguards in place as theatre.
Should companies ban vibe coding?
Ban it by blast radius, not by name. A sensible policy allows it freely for prototypes, internal throwaway tools, scripts, and anything on synthetic data, and prohibits unreviewed AI output in production paths that touch authentication, authorisation, payments, personal data or infrastructure. Blanket bans fail because the tools are good and developers will use them anyway — just without telling you, which is strictly worse than governing it.
Do AI coding tools make developers faster?
For well-specified, conventional work in a familiar codebase, yes, substantially — scaffolding, tests, migrations, boilerplate, unfamiliar syntax. For novel architecture, debugging deep behaviour, and work in a large unfamiliar codebase, measured gains shrink and sometimes invert, because the time moves from writing into reviewing and correcting. The honest summary is that AI tools reliably reduce typing and unreliably reduce thinking, and the second one is where software projects actually spend their time.
What does this mean for technical debt?
AI shifts the cost of debt from creation to comprehension. Code gets written faster than the team builds a mental model of it, so you accumulate systems that work and nobody understands — which is the most expensive kind of debt, because every future change starts with an archaeology project. The practical countermeasures are unglamorous: keep changes small, require that a human can explain every merged diff, document decisions rather than syntax, and treat an unexplainable module as a defect even when it passes its tests.

The short version

AI writes roughly half the new code in the world, with about 1.7 times the defect rate, and gets reviewed about half the time. The problem is not the first number or even the second; it is the third.

So govern by blast radius rather than by sentiment. Vibe code your prototypes freely. Require a named human on anything touching auth, money or personal data. Make security scanning block the build, write tests from the specification, keep the AI away from production credentials, keep diffs small enough to read, and treat a module nobody can explain as a defect even when it is green.

Shipping AI-generated code into production?

Codexal reviews AI-heavy codebases for the failure classes above, and sets up the CI gates, review rules and conventions that let a team keep the speed without the security debt.

Request a code & security review → Read the AI agents guide →

Browse all Codexal articles