Every ISO 27001 certification cycle ends up at the same question: "Do we actually need a penetration test?" The standard never says "you must perform a penetration test," but it doesn't let you off the hook either. Two controls in ISO/IEC 27001:2022 Annex A, 8.8 (Management of technical vulnerabilities) and 8.29 (Security testing in development and acceptance), expect you to find weaknesses before attackers do and to prove that you did. In practice, penetration testing is the most defensible way to show an auditor that you meet both.
This guide covers what each control requires, how to build a testing program that satisfies them, the commands and tooling practitioners use, and the evidence certification auditors actually ask for.
ISO 27001 is risk-based. It tells you what outcomes your ISMS must achieve, and ISO/IEC 27002:2022 provides implementation guidance for each Annex A control. Penetration testing appears in that guidance as a recommended way to identify vulnerabilities and validate security controls.
The 2022 revision restructured Annex A into four themes (Organizational, People, Physical, Technological) with 93 controls. The testing-relevant controls are now consolidated:
The transition period for ISO 27001:2013 certificates ended on 31 October 2025, so every active certificate is now assessed against the 2022 control set. If your testing evidence still references A.12.6.1, update your Statement of Applicability (SoA) mappings before your next surveillance audit.
Control 8.8 requires that information about technical vulnerabilities of information systems in use is obtained, the organization's exposure is evaluated, and appropriate measures are taken. It covers the whole cycle: identify, assess, treat, verify.
A certification body auditor will typically look for:
The last two points are where most organizations fall short. Automated scans produce volume, not assurance. A penetration test shows whether a "medium" misconfiguration chains with a weak credential into domain compromise, and that is the kind of risk evaluation 8.8 asks for.
Start with reconnaissance and service enumeration across the in-scope estate. The workflow below combines Nmap for service fingerprinting with Nuclei for template-driven vulnerability detection, and keeps output files you can hand to an auditor as evidence.
# 1. Full TCP sweep of in-scope ranges with service and version detection
sudo nmap -sS -sV -sC -p- --min-rate 2000 -T4 \
-iL scope_ips.txt \
-oA evidence/2026-11_nmap_fullscope
# 2. Extract live HTTP(S) services for web-focused checks
cat evidence/2026-11_nmap_fullscope.gnmap \
| grep -E "80/open|443/open|8080/open|8443/open" \
| awk '{print $2}' | sort -u > live_web_hosts.txt
httpx -l live_web_hosts.txt -silent -title -tech-detect -status-code \
-o evidence/2026-11_httpx_inventory.txt
# 3. Run Nuclei against confirmed web services, critical and high only first
nuclei -l live_web_hosts.txt \
-severity critical,high \
-tags cve,misconfig,exposure,default-login \
-rate-limit 150 \
-jsonl -o evidence/2026-11_nuclei_crit_high.jsonl
[cta]
Keep the date-stamped filenames. Clause 7.5 (documented information) means your evidence should be traceable, and auditors like seeing raw output that matches the summary in your report.
Control 8.8 explicitly asks you to evaluate exposure, not just collect CVEs. A mature program puts actively exploited vulnerabilities first. The script below enriches scanner output with CISA's Known Exploited Vulnerabilities catalog and FIRST's EPSS scores so remediation SLAs reflect real-world risk.
#!/usr/bin/env python3
"""Enrich Nuclei JSONL output with CISA KEV and EPSS for ISO 27001 A.8.8 risk triage."""
import json, sys, requests
KEV_URL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
EPSS_URL = "https://api.first.org/data/v1/epss?cve={}"
kev = {v["cveID"] for v in requests.get(KEV_URL, timeout=30).json()["vulnerabilities"]}
def epss(cve):
r = requests.get(EPSS_URL.format(cve), timeout=15).json().get("data", [])
return float(r[0]["epss"]) if r else 0.0
for line in open(sys.argv[1]):
f = json.loads(line)
cves = f.get("info", {}).get("classification", {}).get("cve-id") or []
for cve in cves:
cve = cve.upper()
score = epss(cve)
in_kev = cve in kev
sla = "7 days" if in_kev or score >= 0.5 else "30 days"
print(f"{f['host']:<40} {cve:<18} KEV={in_kev!s:<5} EPSS={score:.3f} SLA={sla}")
[cta]
Write SLA thresholds like these into your vulnerability management procedure. When an auditor asks "how do you decide what to fix first?", you can point to a documented, repeatable method. If you'd rather have experienced testers validate which of those findings are actually exploitable in your environment, Redfox Cybersecurity's compliance-aligned penetration testing maps every confirmed finding to the relevant ISO 27001 control.
Where 8.8 focuses on systems already in use, 8.29 targets the development lifecycle. It requires security testing processes to be defined and implemented in the development life cycle, and that new systems, upgrades, and new versions undergo security acceptance testing before going to production.
ISO 27002:2022 guidance for 8.29 points to several testing activities:
The key point for auditors is that testing must be planned and tied to acceptance criteria. A release that ships without a documented security gate is a nonconformity waiting to happen.
A practical way to show 8.29 compliance is a pipeline that blocks merges on critical findings and archives the results. This GitHub Actions workflow runs Semgrep for static analysis, Trivy for dependency and container scanning, and Gitleaks for secret detection.
name: iso27001-a8-29-security-gate
on:
pull_request:
branches: [ main, release/* ]
jobs:
security-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SAST (Semgrep)
run: |
pip install semgrep
semgrep scan --config p/owasp-top-ten --config p/secrets \
--severity ERROR --error --sarif -o semgrep.sarif
- name: SCA and container scan (Trivy)
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
trivy fs . --scanners vuln,misconfig --severity CRITICAL,HIGH --exit-code 1 \
--format sarif -o trivy.sarif
- name: Secret scanning (Gitleaks)
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive evidence for ISMS records
if: always()
uses: actions/upload-artifact@v4
with:
name: a8-29-evidence-${{ github.sha }}
path: "*.sarif"
retention-days: 400
[cta]
The 400-day retention is deliberate. It covers a full surveillance cycle, so you can show historical gate results during the audit.
Static analysis can't see runtime behavior. For acceptance testing, run an authenticated dynamic scan against a staging environment that mirrors production. OWASP ZAP's automation framework makes this reproducible:
# zap-acceptance.yaml : run with
# docker run -v $(pwd):/zap/wrk:rw ghcr.io/zaproxy/zaproxy:stable zap.sh -cmd -autorun /zap/wrk/zap-acceptance.yaml
env:
contexts:
- name: staging-app
urls: [ "https://staging.example.com" ]
authentication:
method: browser
parameters:
loginPageUrl: "https://staging.example.com/login"
users:
- name: qa-standard-user
credentials:
username: "${ZAP_USER}"
password: "${ZAP_PASS}"
jobs:
- type: spiderAjax
parameters: { context: staging-app, user: qa-standard-user, maxDuration: 10 }
- type: activeScan
parameters: { context: staging-app, user: qa-standard-user, policy: "Default Policy" }
- type: report
parameters:
template: traditional-html
reportDir: /zap/wrk/evidence
reportTitle: "A.8.29 Acceptance DAST - Release 4.12"
[cta]
Automated DAST finds injection points and missing headers well. It reliably misses business logic flaws, broken object-level authorization, and multi-step privilege escalation, which is where manual testing earns its place.
Broken access control has topped the OWASP Top 10 for years, and scanners rarely catch it because they don't understand who should be allowed to see what. A tester checks authorization by swapping identifiers between two accounts at different privilege levels:
# Enumerate API endpoints from a captured route list
ffuf -u https://staging.example.com/api/v2/FUZZ \
-w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt \
-H "Authorization: Bearer $TOKEN_USER_A" \
-mc 200,201,204,401,403 -ac -o evidence/ffuf_api.json -of json
# Test for IDOR/BOLA: request User B's invoice using User A's token
curl -s -o /dev/null -w "%{http_code}\n" \
-H "Authorization: Bearer $TOKEN_USER_A" \
https://staging.example.com/api/v2/invoices/88412 # invoice owned by User B
# Confirm a suspected SQL injection in a tenant filter parameter (authorized scope only)
sqlmap -u "https://staging.example.com/api/v2/reports?tenant=42" \
-H "Authorization: Bearer $TOKEN_USER_A" \
-p tenant --level 3 --risk 2 --batch --technique=BT \
--output-dir=evidence/sqlmap
[cta]
A 200 response returning another tenant's invoice is a critical finding under both 8.29 (it should have failed acceptance testing) and 5.15 (access control). The Redfox Cybersecurity Web App + API penetration test covers authenticated roles specifically so these cross-tenant flaws come out before release.
Control 8.8 applies to all information systems in use, not just internet-facing ones. Internal testing under an assumed-breach model shows how far an attacker could move after a single endpoint is compromised, which is often the clearest way to show leadership what is really at stake.
What matters for an ISO 27001 auditor is that internal testing is scoped, authorized, and evidenced. A credible internal engagement reviews the following areas and records the outcome of each:
Testers working internally should operate under control 8.34, which protects live systems during testing. In practice that means read-only validation where possible, agreed change windows, rollback plans, and a named point of contact who can halt the engagement. Those safeguards are themselves audit evidence: they show testing was conducted without putting production information at risk.
Internal network and Active Directory testing is specialist work, and most teams bring in an external partner for it. The Redfox Cybersecurity internal network penetration test runs on exactly this assumed-breach model and maps the lateral-movement paths it finds back to the specific Annex A controls that failed, so the report plugs straight into your corrective-action process.
A penetration test only satisfies 8.8 and 8.29 if the output feeds your ISMS. The report that impresses an engineer is rarely the one an auditor needs. Make sure every finding carries the fields below so it can live in your risk register and corrective-action log.
Feed each finding into your risk treatment plan (clause 6.1.3). An open critical with a documented owner, a due date, and a planned retest is defensible. An open critical with no plan is a nonconformity.
Both controls are built around a cycle, not a one-time event. Control 8.8 asks you to verify that measures were effective, and 8.29 asks for testing before each significant release. A finding is not closed until a retest confirms it.
Structure the remediation window around a clear, repeatable sequence:
1. Test -> findings issued, mapped to Annex A controls
2. Triage -> severity + EPSS/KEV, SLA assigned
3. Remediate -> owner fixes, documents the change
4. Retest -> tester re-validates the specific finding
5. Close + archive -> risk register updated, evidence stored for audit
[cta]
Keep the "before" and "after" evidence together. During a surveillance audit, showing a critical finding that was found, fixed, and verified closed is one of the strongest demonstrations of a working ISMS you can offer.
ISO 27001 sets no fixed frequency, so you justify your cadence through risk. A defensible baseline that auditors recognize looks like this:
Write the cadence and its risk justification into your vulnerability management procedure, then actually follow it. Auditors check that your documented process matches your records.
Pricing depends on scope, asset count, and depth, but published starting points help you budget. Redfox Cybersecurity lists the following packages, with final pricing set during scoping:
For organizations going through certification for the first time, the Audit Bundle usually gives the cleanest evidence set, because one report covers the breadth both controls expect. You can review current scoping and request a tailored quote from Redfox Cybersecurity based on your Statement of Applicability.
A few recurring errors turn a good testing program into an audit finding:
ISO 27001 does not mandate penetration testing by name, but Annex A 8.8 and 8.29 make it the most practical way to prove you find, evaluate, treat, and verify technical weaknesses across both running systems and the development lifecycle. Control 8.8 wants continuous vulnerability management with real exposure evaluation and verified remediation. Control 8.29 wants security testing built into your pipeline and enforced as an acceptance gate before release.
The organizations that sail through certification treat testing as a loop: scope by risk, test with a mix of automation and manual depth, map every finding to a control, remediate with an owner and a date, retest to confirm, and archive the evidence. Do that consistently and the audit becomes a formality rather than a scramble. If you want testing built around the Annex A control set from the start, with findings mapped for your auditor and retests included, Redfox Cybersecurity runs compliance-aligned engagements for exactly this purpose.