A vulnerability assessment tries to find and rank as many weaknesses as possible. A penetration test tries to prove what an attacker can actually do with a few of them. One is breadth, the other is depth. Most confusion around "pentest vs vulnerability assessment" comes from vendors using the words interchangeably, and from teams buying one when they needed the other.

This guide explains both, compares them side by side (goal, depth, exploitation, frequency, automation, cost and output), shows when to use each and where continuous code-level assessment fits in between.

What is a vulnerability assessment?

A vulnerability assessment is a systematic process to identify, validate, prioritize and report security weaknesses. It is mostly automated and designed to be repeated. A typical cycle looks like this:

  1. Scope and inventory: which hosts, applications, repositories, cloud accounts and dependencies are in play.
  2. Discovery: scanners and analyzers look for known issues: missing patches, vulnerable library versions, misconfigurations, insecure code patterns, exposed secrets.
  3. Validation: remove false positives and duplicates.
  4. Prioritization: rank by severity (CVSS), likelihood of exploitation (signals like FIRST's EPSS or CISA's Known Exploited Vulnerabilities catalog) and business context: is it internet-facing, does it touch customer data?
  5. Report and remediation: owners, fixes, deadlines, then a rescan to confirm.

Assessments come in different flavors depending on the target: network and host assessments, web application assessments, cloud configuration reviews and code-level assessments that analyze source code, dependencies and infrastructure-as-code. A code security audit is essentially a deep, code-level vulnerability assessment.

What is a penetration test?

A penetration test is an authorized, simulated attack. Testers work within a defined scope and rules of engagement, and they do not stop at "this looks vulnerable": they try to exploit it, chain it with other weaknesses and demonstrate impact. A pentest usually follows phases like reconnaissance, mapping, exploitation, post-exploitation and reporting, and it can be black box (no knowledge), grey box (some credentials or docs) or white box (full source access). For the full picture, read what is penetration testing.

The value of a pentest is judgment. A human tester notices that a password reset token is predictable, that a low-severity information leak exposes internal IDs, and that those IDs plus a missing authorization check add up to reading every customer's invoices. No single finding was critical; the chain is.

Vulnerability assessment vs penetration testing: comparison table

DimensionVulnerability assessmentPenetration test
GoalFind and prioritize as many weaknesses as possibleProve real-world impact by exploiting weaknesses
DepthBroad and shallow: many assets, many checksNarrow and deep: selected targets, creative attack paths
ExploitationUsually none, or limited safe verificationYes, under rules of engagement, including chaining
FrequencyContinuous, per change, weekly or monthlyTypically annual, per major release or after significant changes
AutomationMostly automated, with human triageMostly manual, tool-assisted
CostLower per run; scales with assets and frequencyHigher per engagement; driven by tester time and scope
OutputRanked list of findings with remediation guidanceNarrative report with attack paths, evidence and business impact
Main weaknessMisses logic flaws and chains; can be noisyPoint-in-time snapshot; limited by scope and hours

Same application, two different reports

Imagine a SaaS API with three issues: a dependency with a known CVE, verbose error messages that leak internal user IDs, and an endpoint that loads a record by ID without checking ownership.

  • The vulnerability assessment reports the CVE as high, the verbose errors as low and, if the tooling reasons about authorization, the missing ownership check as high. Each finding stands alone, with a fix.
  • The pentest may skip the CVE if it is not reachable, but it uses the leaked IDs to enumerate accounts and the missing check to download other tenants' data. The report says: "An authenticated user can read any customer's records." That sentence is what gets budget and attention.

Both reports are correct. They answer different questions. The assessment tells engineering what to fix this sprint; the pentest tells leadership how bad things could get and why the fixes matter. A mature program uses the assessment to keep the backlog short and the pentest to test the assumptions nobody wrote down.

When to use each

Use a vulnerability assessment when

  • You ship code every day and need to catch new weaknesses as they appear.
  • You have never looked at security systematically and need a baseline.
  • You want to clean up known issues before paying for a pentest.
  • You need ongoing evidence of vulnerability management. ISO/IEC 27001:2022, for example, includes an Annex A control for the management of technical vulnerabilities.

Use a penetration test when

  • You are about to launch a major product or feature that handles sensitive data.
  • A customer, investor or regulator asks for an independent pentest report.
  • You made significant architectural changes: new auth, new tenancy model, new public API.
  • Compliance requires it. PCI DSS v4.0, for instance, requires external vulnerability scans by an Approved Scanning Vendor at least every three months (requirement 11.3.2) and internal and external penetration testing at least every 12 months and after significant changes (requirement 11.4).

If you are evaluating vendors, our guide to penetration testing tools covers what automation can and cannot replace.

Questions to ask before hiring either

Whether you buy a vulnerability assessment, a pentest or both, these questions separate useful work from expensive noise:

  • What exactly is in scope? Domains, APIs, mobile apps, cloud accounts, source code. Anything not listed will not be tested.
  • How much is manual? For a pentest, ask for the number of tester days and who the testers are. For an assessment, ask how findings are validated before they reach you.
  • Authenticated or not? Most serious SaaS bugs live behind login. Testing only the public surface misses them.
  • How are findings prioritized? Severity labels alone are not enough. You want exploitability and business context.
  • What does a finding look like? Ask for a sample report. Good findings include evidence, reproduction steps and a concrete fix.
  • Is a retest included? Confirming that fixes work is part of the job, not an upsell.

Common mistakes

  • Buying a scan labeled as a pentest. If the deliverable is an unedited scanner export with no exploitation evidence, it is a vulnerability assessment. Ask how many hours of manual testing are included.
  • Pentesting a codebase full of known issues. Testers will spend your budget reporting outdated libraries and missing headers instead of finding logic flaws.
  • Treating the pentest as the security program. A pentest is a snapshot. Two weeks later, new code ships and the report is already aging.
  • Ignoring prioritization. A vulnerability assessment with 900 unranked findings produces paralysis, not remediation.

How continuous code-level assessment fits

For software companies, most new risk enters through code changes: a new endpoint, a dependency bump, a CI workflow edit. A yearly pentest cannot keep up with that pace. The practical answer is to run a vulnerability assessment at the code level on every change, and keep pentests for what only humans do well.

Code-level assessment combines several static techniques:

  • SAST on your own code, ideally AI SAST that reasons about authorization and data flow, not only fixed patterns. See SAST vs DAST for how it complements runtime testing.
  • Software composition analysis for known CVEs in dependencies, covered in SAST vs SCA.
  • Secret scanning across git history.
  • Infrastructure-as-code and CI checks for GitHub Actions, Dockerfiles, Terraform and Kubernetes.

This is where Nurbak fits. You connect GitHub and scan a repository; its own self-hosted AI model analyzes the code (the analysis does not send your code to OpenAI or Anthropic) and reports exploitable vulnerabilities with the file and line, dependency CVEs via OSV with fixed versions, GitHub Actions, Docker, Terraform and Kubernetes misconfigurations and secrets in git history, summarized in a 0 to 100 score with plain-language explanations. To be clear about scope: Nurbak analyzes code and configuration. It does not run DAST, network scans or live exploitation against your systems, so it complements a pentest rather than replacing it. You can start with a continuous assessment of your code; the free scan shows the three most important findings in full.

A practical program for a software company

  1. Every pull request: code-level assessment (SAST, SCA, secrets, IaC), with exploitable findings fixed before merge.
  2. Weekly or monthly: full repository rescan and review of the remaining backlog; external scans of your internet-facing assets.
  3. Annually and after major changes: a manual penetration test focused on business logic, authentication, multi-tenancy and attack chains.
  4. After every pentest: turn each finding into a regression test and, where possible, into a check that runs on every change, so the same class of bug does not come back.

For a broader view of priorities beyond testing, see our guide on cybersecurity for software companies.

Bottom line

Vulnerability assessment vs penetration testing is not a competition. The assessment gives you coverage and continuity; the pentest gives you depth and proof. Run assessments continuously, especially at the code level where your risk changes daily, and bring in pentesters when you need an independent, adversarial view. If you want the continuous part running today, start with an automated assessment of your repository.

Related reading