Scoping decides what gets tested, how far testing goes, and what happens when something breaks, before anyone sends a payload. This skill covers the scoping discipline for web application tests: the questions to ask, the answers to get in writing, and the artifacts that keep the test honest. Good scoping prevents the two classic failures: testing something you should not have, and not testing something you should have.
Quick Workflow
- Identify the application, its environments, and its data sensitivity.
- Define in-scope targets precisely: URLs, IPs, accounts, APIs.
- Define out-of-scope explicitly: third parties, production data, forbidden techniques.
- Agree the test window, rate limits, and fragile areas.
- Arrange credentials, test data, and communication channels.
- Get the scope signed and store it where the team can find it.
- Brief the team on the scope before testing starts.
1. Scope definition
# Scope checklist file: fill it in the kickoff, keep it versioned
cat > /tmp/scope_checklist.txt <<'EOF'
Application: <name> <version>
Environments: [ ] staging [ ] production [ ] both
In-scope URLs/IPs:
-
Out-of-scope (explicit):
-
User roles provided: [ ] low [ ] high [ ] admin
APIs in scope: [ ] REST [ ] GraphQL [ ] SOAP
Forbidden: [ ] DoS [ ] social engineering [ ] physical
Test window: <dates and hours>
Rate limits: <requests/sec or "none agreed">
Fragile areas: <known unstable features>
Data handling: <what test data may touch>
EOF
Vague scope ("test our web app") is how disputes start. Push for URLs, not descriptions; push for explicit out-of-scope, not silence. What is not listed is not in scope.
2. Rules of engagement
# Rules to agree in writing:
# - What to do on finding critical data (stop? report? continue?)
# - What to do if a system goes down (who to call, in what order)
# - Credential handling (how test accounts are issued and revoked)
# - Evidence handling (where screenshots and logs live)
# - Communication cadence (daily notes? critical-findings hotline?)
# Contact card: keep it one page, keep it current
cat > /tmp/contacts.txt <<'EOF'
Test lead (us): <name> <phone>
Client technical contact: <name> <phone>
Client escalation: <name> <phone>
Agreed critical-finding channel: <channel>
EOF
The outage plan matters most: who gets called, in what order, with what information, when a test action breaks something. Agree it when everyone is calm, not during the incident.
3. Pre-test setup
# Verify scope targets resolve and respond before the window opens
for url in $(grep -E '^https?://' /tmp/scope_checklist.txt); do
echo -n "$url -> "
curl -s -o /dev/null -w '%{http_code}\n' --max-time 10 "$url"
done
# Confirm test accounts work and have the promised roles
# (log in once per role, screenshot the landing page)
# Confirm the agreed rate limit with a 60-second baseline probe
# and note the observed behavior for the team
Pre-test verification catches the classic day-one blockers: wrong URLs, expired VPN credentials, accounts without the promised roles. Fix them before the clock starts.
Edge cases
- The client cannot define the scope precisely. Offer the checklist and a scoping call; do not start testing on a handshake scope.
- Third-party components are embedded (payment, SSO). Mark them out-of-scope explicitly and test only the integration points.
- The window is too short for the scope. Say so in writing with the tradeoff (coverage versus depth) and get the priority list.
- Staging differs from production. Note the differences and their security relevance; findings in staging need a production-verified note before they go in the report as production issues.
Escalation
- Scope disputes mid-test: stop the disputed activity, refer to the signed scope, and get written clarification before continuing.
- You discover an in-scope-adjacent critical issue: report it through the critical channel immediately; scope can be amended, harm cannot be undone.
- The client expands scope verbally: get it in writing (even an email) before acting on it.
Detection and defender view
From the defender's side, scoping is the difference between an expected test and an incident: the SOC should know the source IPs, the window, and the contact channel. Good scoping includes defender coordination: what the blue team should expect, what they should treat as real, and how to reach the test team. The scoping document is a defensive artifact too.
Key references
- NIST SP 800-115 (Technical Guide to Information Security Testing).
- OWASP Testing Guide: introduction and scoping guidance.
- PTES (Penetration Testing Execution Standard): pre-engagement.
