Security Testing
The Complete Guide to Compliance Driven Pentesting in 2026
Understanding how security testing satisfies regulatory requirements across 8 major frameworks
Compliance isn’t just about implementing security controls—it’s about proving they work. Whether you’re handling credit card data, protected health information, federal contracts, or customer financial records, regulators and auditors demand evidence that your security measures can withstand real-world attacks.
This is where penetration testing and vulnerability scanning become not just security best practices, but compliance requirements. Annual pentests, quarterly vulnerability scans, and ongoing security assessments appear across virtually every major compliance framework. Yet many organizations struggle to understand which tests their specific framework requires, how often they need them, and what documentation auditors expect.
In this comprehensive guide, we’ll break down the security testing requirements for eight major compliance frameworks: PCI DSS, HIPAA, SOC 2, CMMC, FedRAMP, ISO 27001, NIST 800-171, and GLBA. We’ll explain what each framework requires, why it matters, and how to ensure your testing satisfies auditor expectations.
Why Security Testing Is a Compliance Requirement
Before diving into specific frameworks, it’s worth understanding why penetration testing has become a near-universal compliance requirement.
Control Validation
Auditors need proof that your security controls actually work under attack conditions, not just on paper.
Risk Assessment
Testing identifies real vulnerabilities that could lead to data breaches—exactly what compliance frameworks aim to prevent.
Continuous Improvement
Regular testing demonstrates ongoing security program maturity and commitment to protecting sensitive data.
PCI DSS: Payment Card Industry Data Security Standard
The Gold Standard for Payment Security Testing
If your organization stores, processes, or transmits credit card data, PCI DSS Requirement 11 mandates comprehensive security testing. This is one of the most explicit and well-defined testing requirements in any compliance framework.
What’s Required:
PCI DSS demands both internal and external vulnerability scans on a quarterly basis, plus additional scans after any significant change to the cardholder data environment (CDE). External scans must be performed by an Approved Scanning Vendor (ASV). Beyond scanning, Requirement 11.3 mandates annual penetration testing of the entire CDE, including both network-layer and application-layer testing.
Testing Scope:
Penetration tests must cover the CDE perimeter, internal segmentation controls, and critical systems. This includes testing whether an attacker who compromises a non-CDE system could pivot into the CDE—validating your network segmentation. Application-layer testing should assess any custom payment applications or e-commerce platforms.
What Auditors Look For:
Your QSA (Qualified Security Assessor) will want to see detailed pentest reports showing the methodology used, vulnerabilities discovered, risk ratings, and remediation evidence. They’ll verify that testing covered all in-scope systems and that high-risk findings were addressed before validation. For quarterly scans, you’ll need “passing” ASV scan reports showing no vulnerabilities rated 4.0 or higher on the CVSS scale.
Pro Tip: Many organizations fail to properly scope their CDE, leading to excessive compliance costs. A proper segmentation test can dramatically reduce your in-scope environment and testing burden.
HIPAA: Health Insurance Portability and Accountability Act
Technical Safeguard Testing for Healthcare
Healthcare providers, health plans, clearinghouses, and business associates handling electronic Protected Health Information (ePHI) must comply with HIPAA’s Security Rule. While HIPAA doesn’t explicitly mandate “penetration testing” by name, the Security Management Process (§ 164.308(a)(1)) requires regular evaluation of technical safeguard effectiveness.
What’s Required:
HIPAA takes a risk-based approach, meaning testing frequency and scope depend on your organization’s risk assessment. However, the Office for Civil Rights (OCR) has made clear in audit findings and settlement agreements that organizations should conduct regular vulnerability assessments and penetration testing as part of their security management process. At minimum, annual testing is considered industry standard.
Testing Scope:
Focus on systems storing or transmitting ePHI. This includes EHR systems, patient portals, billing systems, and backup systems containing health data. Testing should validate technical safeguards like access controls (§ 164.312(a)), encryption (§ 164.312(a)(2)(iv) and (e)(2)(ii)), audit controls (§ 164.312(b)), and authentication mechanisms (§ 164.312(d)).
What Auditors Look For:
OCR auditors want to see evidence that you’re regularly testing your ePHI security controls and addressing identified vulnerabilities in a timely manner. Documentation should show your risk assessment informed your testing scope, findings were prioritized by risk to ePHI, and remediation was tracked to completion. Unlike PCI DSS, there’s no specific report format, but documentation must demonstrate due diligence.
Common Mistake: Many healthcare organizations test their entire IT infrastructure without focusing specifically on ePHI systems. This wastes resources and may not satisfy HIPAA's requirement to evaluate ePHI protection specifically.
SOC 2: Service Organization Control 2
Trust Services Criteria Validation for SaaS Companies
SaaS companies, cloud service providers, and technology vendors pursuing SOC 2 Type II reports need penetration testing to demonstrate the effectiveness of their security controls. SOC 2 evaluates Trust Services Criteria (TSC), and several criteria explicitly or implicitly require security testing evidence.
What’s Required:
While SOC 2 doesn’t mandate specific testing frequency, annual penetration testing has become the de facto standard. Many SOC 2 reports include testing as evidence for Common Criteria 6.1 (logical and physical access controls), CC7.1 (threat detection and mitigation), and CC7.2 (security incident monitoring and response). The specific controls tested depend on which Trust Service Categories you’re being audited against (Security is always required; Availability, Confidentiality, Processing Integrity, and Privacy are optional).
Testing Scope:
Focus on your production environment and systems processing customer data. This typically includes web applications, APIs, cloud infrastructure (AWS/Azure/GCP), authentication systems, and network segmentation between production and non-production environments. Unlike HIPAA or PCI DSS, SOC 2 often requires testing of the business logic and application layer since many SaaS providers’ primary risk is application vulnerabilities.
What Auditors Look For:
Your SOC 2 auditor wants to see that you test controls regularly and remediate findings promptly. The pentest report should map findings to relevant TSC criteria. Auditors will verify that high-risk vulnerabilities were addressed before customer data was exposed, and that you have a documented vulnerability management process. Since SOC 2 Type II covers a 6-12 month period, you may need testing at both the beginning and end of the audit period to show consistent security posture.
Key SOC 2 Controls Requiring Testing Evidence
CC6.1 – Logical and physical access controls
CC6.2 – Access authorization and authentication
CC6.6 – Network security and segmentation
CC6.7 – Data encryption and protection
CC7.1 – Threat detection and mitigation
CC7.2 – Security monitoring and vulnerability management
Why SOC 2 Testing Is Different
Unlike prescriptive frameworks like PCI DSS, SOC 2 is principles-based. This means your auditor has more discretion in determining what testing is adequate. Work closely with your auditor early in the engagement to understand their expectations. Some auditors want testing every six months, others accept annual testing with quarterly vulnerability scans.
CMMC: Cybersecurity Maturity Model Certification
DoD Contractor Requirements for Protecting CUI
Defense contractors handling Controlled Unclassified Information (CUI) must achieve CMMC certification. CMMC Level 2, which covers most DoD contractors, explicitly requires annual penetration testing based on NIST SP 800-171 requirements.
What’s Required:
CMMC Level 2 mandates annual penetration testing per the CA-8 (Security Assessment) requirement from NIST 800-171. Additionally, organizations must conduct vulnerability scans per CA-2 and RA-5 requirements. The testing must be performed by qualified individuals—either internal staff with appropriate expertise or external penetration testers.
Testing Scope:
Testing must cover the entire CUI environment, including boundaries between CUI and non-CUI systems. This means validating network segmentation, testing access controls to CUI data, assessing encryption implementations, and verifying security monitoring capabilities. The test should simulate how an attacker who compromised a non-CUI system could attempt to access CUI.
What Assessors Look For:
Your C3PAO (CMMC Third-Party Assessment Organization) will review your penetration test report to verify it addresses relevant NIST 800-171 controls. They’ll look for evidence that testing covered the security requirements families (Access Control, Identification & Authentication, System & Communications Protection, etc.). The report must show methodology, findings mapped to NIST controls, risk ratings, and remediation evidence. For ongoing compliance, you’ll need annual testing documented in your Plan of Action & Milestones (POA&M).
CMMC Levels and Testing Requirements:
– Level 1: Basic cyber hygiene—vulnerability scanning and basic assessments
– Level 2: Annual penetration testing required (most contractors fall here)
– Level 3: Enhanced testing including red team exercises and continuous monitoring
CMMC Tip: C3PAOs are becoming increasingly strict about testing documentation. Ensure your pentest report explicitly maps findings to NIST 800-171 security requirement families and shows that your CUI boundary was specifically tested.
FedRAMP: Federal Risk and Authorization Management Program
Cloud Service Provider Authorization Requirements
Cloud service providers seeking to sell to federal agencies must achieve FedRAMP authorization. FedRAMP has some of the most rigorous and well-documented security testing requirements of any compliance framework.
What’s Required:
FedRAMP requires annual penetration testing per NIST SP 800-53 control CA-8. Additionally, Cloud Service Providers (CSPs) must conduct monthly vulnerability scans as part of continuous monitoring (ConMon) requirements. External scans must be performed by a FedRAMP-approved scanning vendor, and penetration testing must be conducted by qualified assessors approved by your 3PAO (Third Party Assessment Organization).
Testing Scope:
Testing covers the entire authorization boundary—all systems and components within the FedRAMP-authorized environment. This includes infrastructure (compute, storage, network), applications, APIs, management interfaces, and administrative access paths. For FedRAMP Moderate (the most common authorization level), you must test 325 security controls. FedRAMP High requires testing of 421 controls.
What Assessors Look For:
Your 3PAO will review penetration test results as part of the Security Assessment Report (SAR). They’ll verify that testing addressed all applicable NIST 800-53 control families (Access Control, Identification & Authentication, System & Communications Protection, Configuration Management, etc.). The report must show methodology, findings with CVSS scores, risk ratings, exploitation evidence, and remediation plans. All findings must be documented in your Plan of Action & Milestones (POA&M) with remediation timelines.
For continuous monitoring, you’ll provide monthly vulnerability scan reports to your Authorizing Official through the FedRAMP ConMon portal. Any new high or critical vulnerabilities must be reported within specific timeframes and remediated according to FedRAMP deadlines.
FedRAMP Low
125 controls
Annual penetration testing
Monthly vulnerability scans
Basic continuous monitoring
FedRAMP Moderate
325 controls (most common)
Comprehensive annual testing
Monthly scans
Enhanced monitoring & reporting
FedRAMP High
421 controls
Rigorous testing requirements
Continuous monitoring
Advanced threat detection
ISO 27001: Information Security Management System
International Standard for Information Security
ISO/IEC 27001 is an international standard for information security management systems (ISMS). Organizations pursuing ISO 27001 certification must demonstrate regular security testing as part of their control validation process.
What’s Required:
ISO 27001 Annex A includes two controls specifically related to security testing: A.12.6.1 (Management of technical vulnerabilities) and A.18.2.3 (Technical compliance review). These controls require organizations to regularly assess technical vulnerabilities and conduct independent reviews of security implementations. While the standard doesn’t mandate specific testing frequencies, annual penetration testing with more frequent vulnerability assessments is industry practice.
Testing Scope:
Testing should cover all systems within your ISMS scope as defined in your Statement of Applicability (SOA). This might include network infrastructure, applications, databases, cloud services, and remote access systems. The scope will vary significantly between organizations—a manufacturing company might focus on OT security, while a SaaS provider would emphasize application and API security.
What Auditors Look For:
Your ISO 27001 certification body auditor wants to see evidence that you regularly test your security controls and that testing results inform your risk treatment plan. They’ll verify that findings are tracked through to remediation, that testing frequency is appropriate for your risk assessment, and that you have a documented process for vulnerability management. Unlike prescriptive frameworks like PCI DSS, ISO 27001 auditors focus more on whether you have a systematic approach rather than specific technical requirements.
The auditor will review your testing methodology, ensure it addresses relevant Annex A controls from your SOA, and verify that results are reported to management and the ISMS steering committee. Testing should demonstrate continuous improvement—each cycle should show either reduced vulnerabilities or more comprehensive coverage.
ISO 27001 Flexibility: The risk-based nature of ISO 27001 means you have flexibility in testing scope and frequency. However, certification bodies increasingly expect testing to be more rigorous than in the past, aligning with industry standards like annual pentests.
NIST 800-171: Protecting CUI in Non-Federal Systems
Federal Contractor Baseline Security Requirements
Organizations handling Controlled Unclassified Information (CUI) for federal agencies must comply with NIST SP 800-171, which forms the foundation for CMMC and many other federal security requirements.
What’s Required:
NIST 800-171 requirement 3.12.1 (Security Assessment) mandates periodic assessment of security controls. More specifically, requirement CA-8 from NIST SP 800-171A specifies annual penetration testing. Organizations must also conduct regular vulnerability scans per requirements 3.11.2 (RA-5) and 3.11.3 (CA-2).
Testing Scope:
Testing must cover systems that store, process, or transmit CUI. This includes validating the boundary between CUI and non-CUI environments—one of the most critical aspects of 800-171 compliance. Testing should verify access controls (3.1 family), identification and authentication (3.5 family), system and communications protection (3.13 family), and other security requirement families. The goal is to ensure an attacker cannot access CUI even if they compromise non-CUI systems.
What Auditors/Assessors Look For:
Different organizations audit 800-171 compliance in different ways. DCMA (Defense Contract Management Agency) may review your testing documentation during contractor assessments. DIB CS (Defense Industrial Base Cybersecurity) program assessments will verify testing evidence. And C3PAOs conducting CMMC assessments will review 800-171 testing as the baseline for CMMC Level 2.
Regardless of who’s auditing, they’ll want to see annual penetration test reports that explicitly address NIST 800-171 security requirements. The report should show that CUI boundaries were tested, findings are mapped to relevant security requirement families (3.1 through 3.14), and vulnerabilities were remediated according to a documented plan. Your System Security Plan (SSP) should reference testing as evidence of control effectiveness.
GLBA: Gramm-Leach-Bliley Act Safeguards Rule
Financial Institution Security Requirements
Financial institutions subject to the Gramm-Leach-Bliley Act must implement the FTC’s Safeguards Rule, which was significantly updated in 2021 to include explicit security testing requirements.
What’s Required:
The updated Safeguards Rule (16 CFR § 314.4(c)) now explicitly requires financial institutions to conduct both annual penetration testing AND bi-annual (twice yearly) vulnerability assessments. This is one of the most prescriptive testing mandates in any regulation. These requirements apply to banks, credit unions, mortgage lenders, insurance companies, investment firms, and many fintech companies that meet the GLBA definition of “financial institution.”
Testing Scope:
Testing must cover information systems that store, process, or transmit customer information. This includes customer-facing applications (online banking, loan applications), internal systems (core banking platforms, CRM systems), and infrastructure supporting these systems. The Safeguards Rule also requires testing of multi-factor authentication implementations (§ 314.4(e)) and encryption controls (§ 314.4(d)).
What Examiners Look For:
Federal and state financial regulators examine GLBA compliance during routine examinations. They’ll review your annual penetration test reports and bi-annual vulnerability assessment reports. Examiners want to see that testing was conducted by qualified personnel (either qualified internal staff or external assessors), that findings were prioritized by risk, and that high and critical vulnerabilities were remediated promptly.
Documentation should include written reports with executive summaries suitable for board presentation, technical details of findings, remediation evidence, and evidence that testing results informed your written information security program. Examiners may also verify that your board of directors or equivalent governing body receives regular updates on testing results and vulnerability remediation progress.
Recent Change: The FTC significantly strengthened GLBA testing requirements in 2021. Many financial institutions that previously conducted only annual vulnerability scans now need full penetration testing. If you haven't updated your testing program since 2021, you may be out of compliance.
Comparison: Testing Requirements Across Frameworks
PCI DSS
Pentest: Annual
Vuln Scans: Quarterly (ASV)
Scope: Cardholder Data Environment
Specificity: Very Prescriptive
HIPAA
Pentest: Risk-based (typically annual)
Vuln Scans: Regular (frequency varies)
Scope: ePHI Systems
Specificity: Flexible/Risk-Based
SOC 2
Pentest: Annual (industry standard)
Vuln Scans: Varies by auditor
Scope: Production environment
Specificity: Principles-Based
CMMC L2
Pentest: Annual
Vuln Scans: Regular
Scope: CUI Environment
Specificity: Prescriptive
FedRAMP
Pentest: Annual
Vuln Scans: Monthly
Scope: Authorization Boundary
Specificity: Very Prescriptive
ISO 27001
Pentest: Risk-based (typically annual)
Vuln Scans: Regular
Scope: ISMS Scope
Specificity: Flexible/Risk-Based
NIST 800-171
Pentest: Annual
Vuln Scans: Regular
Scope: CUI Systems
Specificity: Prescriptive
GLBA
Pentest: Annual
Vuln Scans: Bi-annual
Scope: Customer Information Systems
Specificity: Prescriptive
Best Practices for Compliance-Driven Testing
Regardless of which framework applies to your organization, these best practices will help ensure your testing satisfies auditor expectations:
Schedule Testing Early
Don’t wait until weeks before your audit to conduct testing. If you find critical vulnerabilities, you’ll need time to remediate and retest. Schedule penetration tests at least 3-4 months before audit deadlines to allow for remediation cycles.
Get Framework-Specific Reports
Ensure your testing provider understands your compliance framework and delivers reports that explicitly map findings to the relevant controls. A generic pentest report often doesn’t satisfy auditor requirements.
Scope Testing Correctly
Work with your auditor or assessor to understand exactly what systems must be in scope for testing. Over-scoping wastes money; under-scoping leads to audit findings. Many frameworks have specific scoping guidance—follow it carefully.
Document Remediation
Auditors don’t expect perfect security, but they do expect documented remediation efforts. Track every finding from identification through remediation, with evidence of testing to verify fixes. For findings you can’t immediately fix, document them in your risk register or POA&M with planned remediation dates.
Test After Significant Changes
Many frameworks require testing after significant system changes. Major application updates, infrastructure migrations, or new services should trigger security testing even if you recently completed annual testing. This is explicit in PCI DSS and implied in most other frameworks.
Use Qualified Testers
Some frameworks require specific qualifications (PCI DSS ASVs, FedRAMP-approved scanners), while others just require “qualified” personnel. Regardless, use experienced penetration testers who understand your industry and compliance requirements. Poor testing that misses critical vulnerabilities is worse than no testing at all.
Common Mistakes That Lead to Audit Findings
After conducting hundreds of compliance-focused penetration tests, we’ve seen organizations make the same mistakes repeatedly. Avoid these common pitfalls:
Testing the wrong systems: Organizations often test their entire IT infrastructure when only a subset is in-scope for compliance. This wastes budget and may miss critical in-scope systems. Conversely, some organizations under-scope and miss systems that auditors consider in-scope.
Inadequate documentation: Even excellent testing fails compliance requirements if documentation is insufficient. Auditors need to see methodology, scope definition, findings with risk ratings, and remediation evidence. A verbal readout or a spreadsheet of vulnerabilities isn’t sufficient.
Ignoring “acceptable risk” decisions: If you decide not to remediate a finding due to compensating controls or acceptable risk, document this decision formally. Auditors need to see that you consciously accepted the risk, not that you ignored it.
Using automated scanning as “penetration testing”: Vulnerability scanning and penetration testing are different. Scans identify known vulnerabilities; pentests simulate real attacks and test for complex, logic-based flaws. Don’t try to pass off a Nessus scan as a penetration test—auditors know the difference.
Missing the retest: Many organizations fix vulnerabilities but never verify the fixes work. Always conduct retesting (or include it in your original testing scope) to prove remediation was effective.
Testing at the wrong time: If your SOC 2 report covers January-December but you test in November, your testing doesn’t provide evidence for most of the audit period. Plan testing timing to align with your audit or certification cycle.
The ROI of Compliance-Driven Testing
While compliance testing may feel like a checkbox exercise, organizations that approach it strategically see significant returns:
Reduced Breach Risk: The testing required by compliance frameworks often identifies vulnerabilities that could lead to actual breaches. PCI DSS testing requirements exist because card data breaches cost the industry billions annually. HIPAA testing helps prevent the healthcare data breaches that now average $10.93 million per incident.
Faster Audits: When you proactively conduct compliant testing with proper documentation, audits proceed smoothly. Auditors spend less time requesting evidence and more time validating your program. This reduces audit costs and staff time spent responding to auditor questions.
Competitive Advantage: SOC 2 reports are essentially a requirement for selling to enterprise customers. FedRAMP authorization opens the massive federal market. CMMC will soon be required for most DoD contracts. Compliance testing isn’t just about avoiding penalties—it’s about enabling business growth.
Improved Security Posture: When done right, compliance testing actually improves your security. The key is viewing it as an opportunity for continuous improvement rather than a burden. Organizations that iterate on their testing year over year build increasingly robust security programs.
Insurance Benefits: Cyber insurance underwriters increasingly require evidence of regular penetration testing. Some insurers offer premium discounts for organizations that demonstrate rigorous testing programs. And if you do suffer a breach, evidence of reasonable security measures (including regular testing) may improve your negotiating position.
Planning Your Compliance Testing Program
Whether you need testing for one framework or multiple, here’s how to build an effective program:
Step 1
Identify Requirements
List all applicable compliance frameworks and their specific testing requirements. Note frequency, scope, and any required certifications for testers.
Step 2
Define Scope
Work with your auditor or assessor to precisely define in-scope systems. Document scope decisions and get auditor agreement before testing begins.
Step 3
Schedule Testing
Create a testing calendar that aligns with audit cycles and provides time for remediation. Consider scheduling quarterly vulnerability scans with annual pentests.
Step 4
Build Remediation Process
Establish a documented process for triaging findings, assigning remediation owners, tracking progress, and retesting. This process is often audited itself.
Ready to Meet Your Compliance Testing Requirements?
Graynode Security provides penetration testing and vulnerability assessments specifically designed for compliance requirements. We understand the documentation and scoping requirements for PCI DSS, HIPAA, SOC 2, CMMC, FedRAMP, ISO 27001, NIST 800-171, and GLBA—and we deliver reports that auditors accept.
Whether you need testing for one framework or multiple, we’ll work with you to scope testing appropriately, schedule around your audit cycle, and provide the evidence your auditors require.
