Pentest vs VAPT vs Code Audit: What Are You Actually Paying For?
The terms pentest, VAPT, and code audit get used interchangeably, leading companies to pay for a locked-door checklist when they needed someone to try climbing through the window. Let's clear up the differences.
Shivam Singh
Founder & Principal Security Researcher, SDX Shadow Labs
Imagine you're buying a house. One inspector walks around the outside, checks the doors, jiggles the windows, and tells you which ones aren't locked. Another one actually tries to break in - picks the lock, climbs through the window, sees how far into the house they can get before someone notices. A third skips the house entirely and goes straight to the architect's blueprints, checking whether the wiring behind the walls was ever done safely in the first place.
All three are "security checks." All three tell you something true. None of them tell you the same thing.
That's the exact confusion that happens every time a CTO, founder, or IT manager gets a security proposal with the words penetration test, VAPT, or code audit on it. The terms get used interchangeably, vendors don't always explain the difference, and a lot of companies end up paying for a locked-door checklist when what they actually needed was someone trying to climb through the window. That gap doesn't stay theoretical for long - it shows up later as a compliance auditor asking "where's your proof this was actually exploitable," or worse, as a breach nobody saw coming because nobody ever really tried to break in.
Let's clear it up properly - in plain language first, technical detail second.
Vulnerability Assessment: The Walk-Around
A vulnerability assessment is the walk-around-the-house part. It's an automated scan across your systems, applications, and infrastructure that flags anything known to be weak - outdated software, missing patches, sloppy configurations, weak encryption, doors left unlocked. It's fast. It's broad. It's relatively cheap. And it answers exactly one question: what's out there that shouldn't be?
What it can't tell you is whether any of it actually matters. A scanner doesn't know if that unlocked window has a guard dog behind it, or whether three "minor" issues can be chained together into a full break-in. It just hands you a list, sorted by severity, and moves on. That's genuinely useful - but it's a starting point, not a verdict.
Penetration Testing: The Actual Break-In
This is where a real person - not a tool - tries to get in. A penetration tester takes those flagged weaknesses (and plenty a scanner never would've caught) and actually attempts to exploit them, the way a real attacker would. It answers a completely different question: can someone actually break this, and once they're in, how far can they get?
The output isn't a checklist - it's a story. How the tester got past the front door, what room they ended up in, what they could see, touch, or steal once they were inside, all backed by a reproducible proof that it actually worked. This is also the only place where the deeply human stuff gets caught - the logic flaws, the "wait, why does this workflow let me skip a payment step" moments, the timing tricks - the kind of creative thinking no scanner has ever been capable of.
Penetration tests come in three flavors, depending on how much the tester knows going in:
- Black-box - the tester knows nothing, just like a real outside attacker. Best for finding out what your business actually looks like to a stranger on the internet.
- Gray-box - the tester gets a normal user login and some basic documentation, similar to what a low-level employee or a leaked credential might hand an attacker. This is the sweet spot for most modern apps and SaaS products - realistic, but not a wild goose chase.
- White-box - the tester gets everything: full source code, architecture diagrams, the works. Reserved for the systems where "we didn't find anything in two weeks" just isn't good enough - payments, health data, anything that would make the news if it broke.
None of these is the "premium" option and the others "budget" - they're answering different questions, and a good security partner asks what you actually need to know before recommending one.
VAPT: Both, Done Together
VAPT isn't a mysterious third thing - it's simply the scan and the break-in, run as one engagement. First the walk-around to map every possible weak spot, then a skilled human going after the ones that actually matter to confirm they're real and show you exactly what happens if someone gets through.
This combination is, in practice, what almost every compliance framework actually means when it says "security testing." ISO 27001, SOC 2, PCI DSS, HIPAA, India's DPDP Act - none of them are satisfied by a scanner report alone, because a list of theoretical issues doesn't prove anything got tested for real. And a single break-in test alone doesn't prove you've covered your whole estate. Together, they give you both the map and the proof - which is exactly what an auditor, a regulator, or a nervous enterprise customer filling out a security questionnaire is actually asking to see.
Here's the trap worth knowing about: some reports labeled "penetration test" are, quietly, just a scanner printout with a fancier cover page - a list of CVEs and CVSS scores, no actual break-in, no proof anything was exploitable. If a report can't show you how something was broken into, with evidence, it's a vulnerability assessment wearing a costume.
Code Audit: Reading the Blueprints
A code audit skips the house entirely and goes straight to the blueprints - the actual source code, read line by line by a human who understands how software breaks. Authentication logic, how sessions are handled, who's allowed to do what and why, how credentials and secrets are stored, whether a "temporary" shortcut a developer wrote six months ago quietly became a permanent hole.
This is the one method that doesn't care whether the flaw is easy to trigger from the outside. A logic bug sitting dormant in a code path nobody happened to hit during a two-week pentest window is invisible to every other method - but it's sitting right there in the blueprint, waiting. A hardcoded password in a config file might never show up as a symptom on the live app at all, until the day it does.
This is the right move before a major launch, during due diligence when acquiring or investing in a company, when a compliance framework specifically wants evidence of secure development practices, or any time "nothing broke during testing" isn't reassuring enough given what's at stake.
So Which One Do You Actually Need?
Think about the question you're trying to answer, not the label on the proposal:
- "What weak spots do we have across everything we run?" → Vulnerability assessment, ideally running continuously, not once a year
- "Can someone actually break into this specific thing, and how bad would it be?" → Penetration testing
- "We need both, and we need it to satisfy an auditor or a big customer's security team" → VAPT
- "We're about to ship something big, or need proof our code itself is clean" → Code audit
- "We're building something where a breach would be genuinely catastrophic" → Code audit and a white/gray-box pentest, together - don't choose one
Why the Lines Are Blurring Right Now
Two things happening in 2026 are making this harder to keep neatly separated, and worth knowing before your next scoping call:
Shipping speed has outrun the once-a-year test. When a product ships several times a week, an annual pentest is basically a photograph of a moving car - accurate for the split second it was taken, meaningless a month later. That's pushing more teams toward continuous scanning between full manual engagements, rather than treating security testing as a once-a-year calendar event.
AI-written code has made the blueprints themselves less trustworthy. A meaningful share of AI-generated code has been shown to introduce classic OWASP-style vulnerabilities on security-sensitive logic - and codebases that get repeatedly revised by an AI assistant tend to pick up more critical flaws with each pass, not fewer. That's a problem no amount of poking at the live application from outside will ever catch, because the flaw lives in code that might not get triggered during a testing window at all. It's making code audit far less of a "nice to have for compliance" and a lot more of a "you probably need this now."
The Bottom Line
None of these three are competing for the same job. A vulnerability assessment tells you what's lying around. A penetration test tells you what someone could actually do with it. A code audit tells you what's baked into the foundation before it ever becomes visible from outside. And VAPT is simply the map and the break-in together - which is what almost everyone actually means, whether they say it or not, when they ask for "a pentest."
So next time a proposal lands in your inbox, skip the buzzword and ask one plain question: "What exactly will you do, and what will I actually have in hand when it's done?" The answer tells you more than the title on the cover page ever will.
Want us to test your architecture? → Request an Assessment