Define a Penetration Test Scope
Purpose
Produce an unambiguous, signed-off scope and rules of engagement so that an authorized test covers the real risks, stays legal and safe for production, and delivers a usable report.
When to use
- Commissioning an external or internal penetration test.
- A release, certification, customer contract or regulator requires an independent security test.
- Scoping a retest after remediation.
When not to use
- You still need to understand the threats to decide what to test. Use
threat-model first.
- You are writing up results. Use
security-finding-report.
- The commercial contract with the vendor is the focus. Use
statement-of-work.
Inputs
Required:
- The system(s) to be tested and the business objective of the test (why now, what decision it supports).
Optional, improves quality:
- Asset list: URLs, API specs, IP ranges, mobile app builds, cloud accounts.
- Threat model, previous pentest reports, known weaknesses.
- Environment constraints (production vs staging), change freeze dates, compliance drivers (PCI DSS, BDDK, ISO 27001).
If the target systems or objective are missing, ask. Never include assets whose ownership or authorization is unclear; list them as open questions.
Process
- State the objective: e.g. validate that customers cannot access other customers' data; satisfy a compliance requirement; pre-go-live assurance.
- Define the test type: black, grey or white box; external, internal, authenticated; web, API, mobile, cloud configuration, social engineering (only if explicitly authorized).
- List in-scope targets precisely (hostnames, IP ranges, API base paths, app versions, cloud accounts) and confirm the organization owns or is authorized to test each; third-party hosted services need the provider's permission.
- List exclusions explicitly: third-party services, shared infrastructure, denial-of-service, destructive tests, physical tests, specific endpoints.
- Define rules of engagement: test windows and time zone, allowed techniques, rate limits, data handling (no exfiltration of real personal data, use of synthetic test accounts), and stop conditions.
- Define accounts and data: test users per role and tenant, API credentials, test data sets; ensure real personal data is minimized in line with KVKK/GDPR.
- Define communication: points of contact on both sides, emergency contact, how critical findings are reported immediately, how the SOC is informed to avoid false incident response.
- Define reporting: severity scheme (e.g. CVSS), required content per finding, executive summary, delivery date, retest window.
- Capture legal and approvals: written authorization from the asset owner, NDA, data processing terms, insurance if required.
- Produce the scope document and a sign-off list.
- If the goal continues, suggest
threat-model to prioritize test focus areas, and security-finding-report and vulnerability-triage for handling results after the test.
Output format
# Penetration Test Scope and Rules of Engagement: <system>
## Objective
## Test Type and Approach
## In Scope
| Target | Type | Environment | Owner | Authorization confirmed |
## Out of Scope
## Rules of Engagement
- Window: ... · Techniques allowed / prohibited: ... · Rate limits: ...
- Data handling: ... · Stop conditions: ...
## Accounts and Test Data
## Communication and Escalation
| Role | Name | Contact | Availability |
## Reporting and Retest
## Approvals
| Approver | Role | Date |
## Open Questions
Quality checklist
Common pitfalls
- Scoping by "the whole application" without URLs, versions and environments. Vendors then test the wrong thing or too little.
- Testing in production without backups, rate limits or stop conditions.
- Forgetting authorization for cloud or SaaS providers hosting the targets.
Example
Input: "Grey-box pentest of new customer portal and public API before go-live."
Excerpt of output:
| portal.example.test | Web app | Staging | Digital team | [TBD] |
| api.example.test/v1 | REST API | Staging | Platform team | [TBD] |
- Prohibited: denial-of-service, social engineering, testing the payment provider's hosted page.
- Stop condition: any access to data of a real customer; notify the emergency contact within 15 minutes [ASSUMPTION].
1---2name: pentest-scope3description: "Defines the scope and rules of engagement for an authorized penetration test: objectives, in-scope targets, exclusions, test type and depth, test windows, accounts and data, communication and stop conditions, legal authorization and reporting expectations. Use when commissioning an internal or external pentest, preparing a statement of work with a testing vendor, or planning a pre-release security test."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/pentest-scope7 version: "1.0.0"8 language: en9 category: 09-security10 role: security-engineer11 area: assessment12 title: "Define a penetration test scope"13 related: "threat-model, security-finding-report, vulnerability-triage, audit-preparation, statement-of-work"14 prompt: "Define the pentest scope for our new customer portal and its public API before go-live; an external vendor will do a grey-box test."15---1617# Define a Penetration Test Scope1819## Purpose20Produce an unambiguous, signed-off scope and rules of engagement so that an authorized test covers the real risks, stays legal and safe for production, and delivers a usable report.2122## When to use23- Commissioning an external or internal penetration test.24- A release, certification, customer contract or regulator requires an independent security test.25- Scoping a retest after remediation.2627## When not to use28- You still need to understand the threats to decide what to test. Use `threat-model` first.29- You are writing up results. Use `security-finding-report`.30- The commercial contract with the vendor is the focus. Use `statement-of-work`.3132## Inputs33Required:34- The system(s) to be tested and the business objective of the test (why now, what decision it supports).3536Optional, improves quality:37- Asset list: URLs, API specs, IP ranges, mobile app builds, cloud accounts.38- Threat model, previous pentest reports, known weaknesses.39- Environment constraints (production vs staging), change freeze dates, compliance drivers (PCI DSS, BDDK, ISO 27001).4041If the target systems or objective are missing, ask. Never include assets whose ownership or authorization is unclear; list them as open questions.4243## Process441. State the objective: e.g. validate that customers cannot access other customers' data; satisfy a compliance requirement; pre-go-live assurance.452. Define the test type: black, grey or white box; external, internal, authenticated; web, API, mobile, cloud configuration, social engineering (only if explicitly authorized).463. List in-scope targets precisely (hostnames, IP ranges, API base paths, app versions, cloud accounts) and confirm the organization owns or is authorized to test each; third-party hosted services need the provider's permission.474. List exclusions explicitly: third-party services, shared infrastructure, denial-of-service, destructive tests, physical tests, specific endpoints.485. Define rules of engagement: test windows and time zone, allowed techniques, rate limits, data handling (no exfiltration of real personal data, use of synthetic test accounts), and stop conditions.496. Define accounts and data: test users per role and tenant, API credentials, test data sets; ensure real personal data is minimized in line with KVKK/GDPR.507. Define communication: points of contact on both sides, emergency contact, how critical findings are reported immediately, how the SOC is informed to avoid false incident response.518. Define reporting: severity scheme (e.g. CVSS), required content per finding, executive summary, delivery date, retest window.529. Capture legal and approvals: written authorization from the asset owner, NDA, data processing terms, insurance if required.5310. Produce the scope document and a sign-off list.5411. If the goal continues, suggest `threat-model` to prioritize test focus areas, and `security-finding-report` and `vulnerability-triage` for handling results after the test.5556## Output format57```markdown58# Penetration Test Scope and Rules of Engagement: <system>59## Objective60## Test Type and Approach61## In Scope62| Target | Type | Environment | Owner | Authorization confirmed |63## Out of Scope64## Rules of Engagement65- Window: ... · Techniques allowed / prohibited: ... · Rate limits: ...66- Data handling: ... · Stop conditions: ...67## Accounts and Test Data68## Communication and Escalation69| Role | Name | Contact | Availability |70## Reporting and Retest71## Approvals72| Approver | Role | Date |73## Open Questions74```7576## Quality checklist77- [ ] Every in-scope target has a confirmed owner and authorization.78- [ ] Exclusions and prohibited techniques are explicit.79- [ ] Stop conditions and an emergency contact exist.80- [ ] The SOC or monitoring team is informed of test windows and source IPs.81- [ ] Test accounts use synthetic data; real personal data handling is restricted.82- [ ] Names, IPs and dates not given in the input are `[TBD]`, not invented.83- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.8485## Common pitfalls86- Scoping by "the whole application" without URLs, versions and environments. Vendors then test the wrong thing or too little.87- Testing in production without backups, rate limits or stop conditions.88- Forgetting authorization for cloud or SaaS providers hosting the targets.8990## Example91Input: "Grey-box pentest of new customer portal and public API before go-live."9293Excerpt of output:94| portal.example.test | Web app | Staging | Digital team | [TBD] |95| api.example.test/v1 | REST API | Staging | Platform team | [TBD] |96- Prohibited: denial-of-service, social engineering, testing the payment provider's hosted page.97- Stop condition: any access to data of a real customer; notify the emergency contact within 15 minutes [ASSUMPTION].