GoldenrozBook a call

Penetration test vs security audit vs SOC 2: what each one proves

A penetration test proves what a skilled attacker could reach in a defined scope during a short window. A security audit, or code audit, proves what is wrong inside the application and database, because the reviewer reads the source with full access. A SOC 2 report is an independent CPA's opinion on whether a company's controls meet the AICPA's trust services criteria, so it is not a test of your code, and a clean penetration test is not a compliance attestation.

A gold sphere under a clear glass dome on a navy base.

Three documents that get confused

A large customer sends a security questionnaire. It asks for “your latest penetration test”, “a security audit” and “your SOC 2 report”. These sound like three names for the same thing. They are three different pieces of work, done by three different kinds of firm, and each proves something the others do not.

Buying the wrong one is expensive in two ways. You pay for it, and the customer still does not accept it.

What a penetration test proves

NIST Special Publication 800-115 describes penetration testing as security testing in which evaluators mimic real-world attacks to identify ways to circumvent the security features of an application, system or network. Testers often chain several weaknesses together to gain more access than one flaw alone would allow.

A penetration test has a scope (which systems), a set of rules (what the tester may do) and a time box (usually days or weeks). The report lists what the tester exploited, with evidence and severity.

What it proves. That in this scope, in this window, a skilled tester did or did not get in, and how.

What it does not prove. That there are no other flaws. A tester working from the outside for a week sees a fraction of what the source code contains. Business logic flaws, such as a user reading another customer’s records through a valid login, are easy to miss without knowledge of the application.

Variants. In a black-box test the tester starts with no inside knowledge. In a white-box test the tester has source code and documentation. Gray-box sits between. The more the tester knows, the more the test finds per day.

A vulnerability scan is not a penetration test. A scan is an automated tool that lists known weaknesses. A report with hundreds of unranked lines is usually a scan.

What a security audit proves

“Security audit” is used loosely. In this post it means a technical review from the inside, with full access to the source code, the database and the configuration.

The reviewer reads the application code and API routes for missing authorization and unsafe input handling. Every table is checked for access rules. The repository and its history are searched for keys that should never reach a browser. Live calls are made as an anonymous visitor and as a logged-in user of another account, to see what answers.

What it proves. What is actually wrong inside the system, including flaws no outside tester would reach in the time allowed.

What it does not prove. It is not an attestation. No standard-setting body stands behind the report, and it does not cover the organization’s policies, hiring or vendor management.

This matters most for applications built quickly. The usual gaps in those are described in vibe coding security risks, and the database side in our Supabase Row Level Security guide.

A formal IT audit, which results in a signed auditor’s opinion, is a different thing again and can only be issued by an accredited firm.

What a SOC 2 report proves

SOC 2 is a reporting framework from the AICPA, the American Institute of Certified Public Accountants. In a SOC 2 examination, an independent CPA firm examines a service organization’s controls against the AICPA’s trust services criteria. The criteria cover five categories: security, availability, processing integrity, confidentiality and privacy. Security is the common baseline, and a company chooses which of the others are in scope.

There are two types.

  • Type 1 reports on whether the controls are suitably designed at a point in time.
  • Type 2 reports on whether the controls operated effectively over a period, which the company and its auditor agree.

What it proves. That an independent CPA examined the company’s controls, such as access management, change management, backups and incident response, and gave an opinion on them.

What it does not prove. That the application has no vulnerabilities. A SOC 2 examination looks at whether controls exist and operate. It is not a line-by-line test of your code. A company can hold a Type 2 report and still ship an authorization bug.

Two more points. SOC 2 results in a report, not a certificate, so “SOC 2 certified” is loose wording. And the criteria are under revision: the AICPA has published an exposure draft of proposed 2027 trust services criteria, so ask your auditor which version will apply to your examination.

Side by side

Penetration test Security audit (code audit) SOC 2 report
Question it answers Can an attacker get in, within this scope and time What is wrong inside the application and database Do the company’s controls meet the trust services criteria
Who does it A penetration testing firm An engineer or security reviewer with source access An independent, licensed CPA firm
Access given From none to full, by agreement Full: source, database, configuration Policies, systems, evidence and interviews
Covers Named systems and networks Code, data access rules, secrets, configuration Organization-wide controls in scope
Output Findings with evidence and severity Findings with fixes An auditor’s report with an opinion
Fixes included No, findings only Can be, as pull requests No
Who usually asks for it Customers, insurers, some regulators Your own team, investors in due diligence Enterprise customers and procurement

Which one you need

Situation Start with
A customer contract names a penetration test from an accredited firm An accredited penetration testing firm
An enterprise customer asks for a SOC 2 report Readiness work, then a CPA firm
The application was built quickly and nobody has reviewed access rules A security audit
Last year’s penetration test found nothing, and you doubt it A security audit, then a retest
You want to know what an outsider can reach on your network A penetration test
A factory network shares a flat network with the office An OT boundary assessment, described below

Always ask the party requesting the document what exactly they accept, and from whom. Some customers accept evidence of an independent application review. Others require an accredited firm. That one email can save a wasted purchase.

The three also work in sequence. An audit finds and fixes the internal flaws. A penetration test then checks what remains exploitable. Both become evidence in a SOC 2 examination, alongside access reviews, change records and restore tests.

OT environments: why factories are assessed differently

Operational technology (OT) is the equipment that runs physical processes: PLCs, SCADA servers, HMIs and the engineering workstations around them. A plant network is not assessed like an office network, for four reasons.

Safety and uptime come first. NIST’s Guide to Operational Technology Security, SP 800-82 Revision 3, addresses OT’s unique performance, reliability and safety requirements. In an office, a crashed server is an inconvenience. On a production line, a controller that stops can halt output or create a hazard.

Active testing can break things. Older controllers and industrial devices were not built to handle unexpected traffic. A port scan that an office server ignores can cause a fragile device to fault. For that reason OT assessments lean on passive traffic observation, configuration and firewall rule review, and interviews. Active tests are run in planned shutdowns or on a test bench.

Equipment is old and cannot always be patched. An HMI may run a Windows version that is years out of support, because the machine vendor certified only that version. The answer is to isolate it, not to assume it will be updated. Shai Goldenberg, our CTO, ran IT for four years at an industrial company where the backup scope included production systems dating from about 1980, so this constraint is familiar to him.

The risk usually enters from the IT side. An attack on a plant typically arrives through the office network, a remote access tool or a vendor’s laptop, and then crosses into a flat network. So the first questions in an OT assessment are about the boundary: every path between office and plant, who has remote access and how, and whether the Windows servers and project files around the controllers are backed up.

The standards differ too. Industrial security work commonly follows the zone and conduit approach described in the IEC 62443 series. A SOC 2 report or an IT penetration test of the office network says little about the plant floor.

Our OT security work stays on the IT side and the IT/OT boundary: segmentation, an industrial DMZ, controlled vendor remote access and backup of the Windows layer, with a restore test. We do not program PLCs or change control logic, which belongs with your controls integrator. We hold no IEC 62443 certification and cannot certify a plant. Related background on remote access models is in VPN vs ZTNA.

What Goldenroz does, and does not do

Buyers often assume a firm that writes about these topics sells all three. We do not.

  • We are not an accredited penetration testing lab. Our penetration testing services page explains the related service we do offer: a code and application security audit with full source access, live tests as an outsider, findings ranked by severity, fixes delivered as pull requests and an automated daily probe left running. The price is fixed and quoted after a 30-minute scoping call. If a contract demands a certified test report, hire an accredited firm.
  • We are not a CPA firm or a QSA. We cannot issue a SOC 2 report or any attestation. Our SOC 2 compliance services are readiness engineering: access control, logging, change management, encryption, backups with a tested restore and an evidence pack for the auditor you choose. Control-building projects start at $25,000 at a fixed price per phase.
  • We hold no security certifications or partner badges. The evidence behind the audit is Shai’s own production work: about 145 tables with Row Level Security and a daily automated probe that calls sensitive functions as an anonymous user.

What to do next

Find the exact sentence in the contract or questionnaire that asked for the document, and ask the sender what they accept and from whom. If the answer is a certified penetration test or a SOC 2 report, you need an accredited tester or a CPA firm, and we can prepare the systems first. If the real question is whether your application and database are safe, read about our penetration testing services alternative, the code and application security audit, and book the 30-minute scoping call.

Questions buyers ask

What is the difference between a penetration test and a security audit?

A penetration test simulates an attack, usually from the outside and within a limited time, and reports what the tester managed to exploit. A security audit reviews the system from the inside: source code, database access rules, configuration and secrets. The audit finds flaws a time-boxed test may not reach, and the test shows what is exploitable in practice.

Does SOC 2 require a penetration test?

The SOC 2 criteria describe outcomes, not a fixed list of tests, so the answer depends on your controls and your auditor. Many auditors and many customers expect to see one. Ask your CPA firm what evidence it will accept before you buy a test.

Who can issue a SOC 2 report?

Only an independent, licensed CPA firm. The AICPA sets the professional standards for SOC engagements. Consultants and compliance platforms can prepare a company for the examination, but they cannot issue the report.

Is Goldenroz a penetration testing firm or a SOC 2 auditor?

No to both. We are not an accredited penetration testing lab, not a CPA firm and not a QSA, and we hold no security certifications. We do a code and application security audit with fixes as pull requests, and the readiness engineering that prepares systems and evidence for the auditor you choose.

Why are factory OT networks tested differently from IT networks?

Because the first priority in a plant is that the physical process keeps running safely. Controllers and older industrial devices can fail when scanned or probed the way an office server is. OT assessments therefore rely on passive observation, configuration review and tests in planned shutdowns or on a test bench.

Written by

CTO and technology partner

Shai leads the technology side: business software, SaaS and mobile apps, payments and escrow systems, Postgres security, AI agents built with Claude Code and MCP, and IT and infrastructure projects with senior infrastructure engineers.

Keep reading

Talk to the person who will do the work

One hour, no sales team. You talk to Daniel or Shai, we look at your account or your product, and you leave with a clear next step.

Or send the details

Book a 1-hour consultationWhatsApp us