In short
- PTES, NIST SP 800-115 and PCI's guidance cut the work into seven, four and three stages, in the same order. NIST and PCI add a retest after the fixes; PTES stops at the report.
- The reference documents are old: NIST SP 800-115 is from September 2008, the free OSSTMM 3 from 2010, PCI's guidance from September 2017 and OWASP WSTG v4.2 from December 2020.
- On a Next.js and Supabase app, the attack surface is the JavaScript bundle, the API routes and the database policies. A test that never runs as two users misses cross-account reads.
- A methodology section should name the standard and its version, the identities, the test window, the automated and manual split, what was not tested and how severity was set.
- A finding closes when the request that proved it fails on the live app, and its variants fail too.
On this page
- What a pentest methodology is, and the phases in order
- Each phase on a Next.js and Supabase app
- The penetration testing standards, compared
- What the methodology section of a report should state
- Which phases software can run, and which need a human
- Retesting: a finding closes when the attack fails again
- Questions
- Sources
What a pentest methodology is, and the phases in order
A pentest methodology is the written order of work behind a penetration test: what is agreed before anyone attacks, how the tester learns the target, how suspicions become proven findings, and how fixes get checked. PCI's penetration testing guidance has a report checklist that asks a blunt question: is the methodology clearly stated?
NIST SP 800-115 cuts the work into four phases, PTES into seven sections, PCI's guidance into pre-engagement, engagement and post-engagement; NIST says there are many acceptable ways to group it. For a web app, it runs in eight steps:
- Scoping and rules of engagement: what is in and out, who may be attacked as whom, and what the tester may change.
- Reconnaissance: what the app gives away to anyone who loads it.
- Mapping: every reachable target, and which identity can reach it.
- Discovery: which targets look weak, compared with known flaws.
- Exploitation with proof: each suspicion tried for real, with the request that worked kept as evidence.
- Impact: how far a working attack goes, in rows, data types and money.
- Reporting: findings with proof, severity and fix, plus what was not tested.
- Fix and retest: the same attack replayed after the fix, until it fails.
The web app pentest guide folds these into five steps. Here is each one on a real stack, with what it should leave in your report.
Each phase on a Next.js and Supabase app
Take a typical app built with a coding agent: Next.js on Vercel, Supabase for data, sign-in and storage, Stripe, and an AI provider behind an API route. The browser talks to Supabase with the public key, so the database policies are the access control.
1. Scoping and rules of engagement
You list every host in scope: the production domain, any preview domain, the Supabase project at https://YOUR_PROJECT_REF.supabase.co with its Edge Functions and storage, and your API routes. Stripe, the AI provider and your email sender stay out. Then the rules: the test window, the accounts, whether writes are allowed, what happens if real personal data is reached, how a critical finding is reported mid-test, and the source IP addresses. PCI's guidance adds success criteria: the point at which the test is complete. In NIST's model, no testing happens in this phase.
Your providers set rules too. Supabase lets customers test their own project's auth, database, Edge Functions, storage and realtime without prior approval, but forbids denial of service, request flooding and attacks on other customers. Vercel allows pentests on Pro and Enterprise plans, not Hobby, and never against its hosting infrastructure. In the report: the signed authorization, how ownership was proven, the scope, dates with a time zone, identities and limits. Testing only from the internet? See external penetration testing.
2. Reconnaissance
The tester loads the app as a browser does and reads every JavaScript chunk it downloads, including routes the menu never shows, and any public source maps. Out come the Supabase URL and public key, table names in calls like supabase.from('orders'), bucket names, API routes and the framework version. PTES calls this intelligence gathering; NIST makes it the first part of discovery. In the report: each key with the file it came from, and versions as observed in responses, not guessed.
3. Mapping
Each table, database function, bucket, Edge Function, API route and Server Action becomes a target, tagged with who can reach it: anyone, any signed-up user, one team, an admin. The closest PTES section, threat modeling, names the assets worth stealing (the profiles table, invoices in storage, your AI credits) and the likely attackers: for most young apps, a stranger with or without an account. In the report: the target list with the identity used against each.
4. Discovery
Each target is compared with known weaknesses: row level security (RLS) off on a table, a policy that only checks that the caller is signed in, a security definer function the public role can call, a public bucket of private files, a Next.js version inside the range of a CVE such as the middleware bypass. NIST calls this vulnerability analysis: automatic for scanners, while manual work can find new or obscure flaws, more slowly. A vulnerability scan stops here, with suspicions only (pentest vs vulnerability scan). In the report: leads tried and refused, kept apart from findings.
5. Exploitation with proof
Each lead is tried for real: as a stranger, as user A, then as user B asking for A's records, because many access control bugs only show between two accounts (IDOR and broken access control). The proof does the least harm: one row rather than the whole table, writes only on the tester's own records, no floods. On sensitive data, PCI's guidance says only a proof-of-concept test should be performed. NIST loops from attack back to discovery, since a working attack often reveals new targets. In the report: for each finding, the exact request, the identity, the response and the time, with personal data masked.
6. Impact
Then the reach: how many rows, which columns, read or write, and what it chains into. A Supabase secret key (sb_secret_...) or legacy service_role key found in the bundle bypasses RLS and reaches the whole database. A policy open to any signed-in user turns a free sign-up into a copy of your customer list. PTES calls this post exploitation. In the report: the impact in your terms (data types, row counts, who can do it) and how severity was set.
7. Reporting
In NIST's model, reporting runs alongside the other phases, with logs and periodic reports before the final one. PCI's suggested outline holds an executive summary, scope, methodology, limitations, a testing narrative, the findings, the tools used and cleanup instructions, and says that merely reporting lists of vulnerabilities does not meet the intent of a pentest. The pentest report sample walks through a finding with its proof. Phase 8, fix and retest, has its own section below.
The penetration testing standards, compared
Five documents come up when customers, auditors and testers talk methodology. Each has a free edition, and most have not changed in years.
| Standard | Publisher and current edition | How it splits the work | Where you meet it |
|---|---|---|---|
| PTES, the Penetration Testing Execution Standard | The PTES project. v1.0; its site still says a v2.0 is "in the works soon" | Seven sections: pre-engagement interactions, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post exploitation, reporting. No retest section | Engagement outlines; PCI and the WSTG both list it |
| OWASP Web Security Testing Guide (WSTG) | OWASP Foundation. v4.2, released on 3 December 2020; v5.0 is in development | Web test cases by category, from information gathering and authorization to business logic, each with an ID such as WSTG-ATHZ-04 | Test coverage for web apps and APIs |
| NIST SP 800-115 | US National Institute of Standards and Technology. The only final edition, September 2008 | Four phases: planning, discovery, attack, reporting. Fixes are verified afterwards, in post-testing | Methodology sections; one PCI case study is built on it |
| OSSTMM, the Open Source Security Testing Methodology Manual | ISECOM. OSSTMM 3, the free edition, from 2010; OSSTMM 4 is in early access for ISECOM Gold members | Operational security across five channels (human, physical, wireless, telecommunications, data networks), with its own metrics and a report format called STAR | Broad security audits, well beyond a web app |
| PCI SSC Penetration Testing Guidance | PCI Security Standards Council. v1.1, September 2017 | Pre-engagement, engagement and post-engagement (remediation, retesting, cleanup), then reporting and evidence retention | Pentests an assessor checks for PCI DSS |
The phases have barely moved since 2008. What these documents predate is the stack AI tools generate, where the browser talks to the database and the access rules live in its policies, so a report should say which tests ran, not only which standard. For a web app, a sound proposal names PTES or NIST for the phases and the WSTG for test cases, plus PCI's guidance when card data is in scope (PCI DSS penetration testing).
What the methodology section of a report should state
"We followed OWASP and PTES" tells you very little. The section should let you repeat the test, or compare two reports line by line:
- The standard and its version. OWASP asks for versioned test IDs, such as
WSTG-v42-ATHZ-04, because IDs can change between versions. - The type of test: black box, grey box with test accounts, or white box with the code (what code access adds).
- The identities: anonymous, user A, user B, an admin, and how each was obtained.
- The window and origin: dates with a time zone and source IP addresses, to find the test in your logs.
- The automated and manual split, which PCI's report checklist asks to see.
- Limitations: what was not allowed (deletes, floods), what could not be reached (an admin role with no test account) and why.
- How severity was set, with the scale explained.
- Evidence and cleanup: how proofs are stored and destroyed, and which test accounts were removed.
Red flags of a scan sold as a pentest
- Nobody asks you to prove you own the app or to agree rules of engagement.
- Your app has logins, and nobody asks for test accounts.
- The methodology names standards but never says which tests ran against which targets.
- Findings come without a request and a response, or say the application "may be vulnerable".
- CVEs are claimed from a version string, with no sign that the vulnerable behaviour was observed.
- Most findings are missing headers, none involves two users, and no retest is offered.
PCI's guidance states the rule behind these flags: simply running an automated tool does not satisfy the penetration testing requirement, because the tool cannot interpret what it finds to assess the true risk.
Which phases software can run, and which need a human
| Phase | What software does well | What still needs a human |
|---|---|---|
| Scoping and rules of engagement | Refusing to attack until ownership is proven | Deciding the scope, signing the authorization |
| Reconnaissance | Reading every page and script for keys, tables, routes and versions | Leads outside the app, such as an old subdomain named in a help page |
| Mapping | Listing targets and the identity that reaches each | Judging which data and actions would hurt your business most |
| Discovery | Matching targets against known flaw classes and CVEs | New or obscure flaws, as NIST notes |
| Exploitation with proof | Known classes: open tables, users reading each other's records, leaked keys that still work, CVEs proven by behaviour | Business logic, such as a refund claimed twice, and long chains of small bugs |
| Impact | Counting rows and classifying the data exposed | Judging what a flaw costs your business |
| Reporting | Keeping the request and response for every attempt | A narrative an auditor or an enterprise buyer will accept |
| Fix and retest | Replaying the exact request after each fix and on every deploy | Judging whether a fix covers the whole flaw class |
The automated penetration testing guide goes deeper on where software stops.
How Keybrum maps onto the phases
Keybrum is the automated side, built for apps made with AI tools. It only attacks an app whose owner proved ownership, then covers reconnaissance, mapping, exploitation and retest. Its attacks target Supabase and Firebase rules, leaked secrets, unprotected AI endpoints, unsigned Stripe webhooks and IDOR across two accounts, and each finding comes with the request that worked. CVEs are proven by behaviour, never with remote code execution or denial-of-service payloads. Cloudflare's security-audit skill is part of its code audit, whose findings are then proven live. Your coding agent reads each fix through Keybrum's MCP server.
Retesting: a finding closes when the attack fails again
A fix is a claim until the attack that proved the flaw fails on the live app. PCI's guidance says exploitable vulnerabilities must be corrected on production systems and the testing repeated. NIST lists retesting among the ways to verify a fix, and notes that the testers can only verify it by repeating the original test. PTES stops at reporting, so put the retest in the contract.
A retest replays the same request, identity and target: the stranger's read of profiles now returns nothing, user B's request for A's invoice is refused. Then it tries the doors next to it, since PCI notes that a flaw found in one area of an app may exist in others: a table locked by RLS can still leak through a view or a database function, and a route fixed for reads can still accept updates.
PCI adds two rules: a retest report shows both dates, the original findings and each result; and when fixes drag on, a new test may be needed, because the app being retested is no longer the app that was tested.
Comparing proposals? Ask each tester, person or tool, to walk you through these eight phases on your stack and to show a redacted sample report. For budgets, see penetration testing cost; for timing, penetration testing for startups.
Questions
What are the phases of a penetration test?
Most methodologies follow the same order: scoping and rules of engagement, reconnaissance, mapping, discovery, exploitation with proof, impact, reporting, then fix and retest. NIST SP 800-115 groups them into four phases (planning, discovery, attack, reporting) and PTES into seven sections. The names change, the order holds.
What are the pentest steps for a web application?
The same phases, with web specifics: reading the JavaScript bundle for keys and routes, mapping tables, functions and API routes, then attacking as a stranger and as two signed-in users. The OWASP Web Security Testing Guide supplies the test cases for each category. The web app pentest guide covers what a full test includes.
Which penetration testing standard should my pentest follow?
For a web app, ask for the OWASP WSTG test cases, cited with their version, plus PTES or NIST SP 800-115 for the phases. If card data is in scope, add PCI's penetration testing guidance. OSSTMM covers wider operational security, from people to wireless, which is more than a web app test needs.
Is NIST SP 800-115 still current?
It is still the published version: NIST lists a single final edition, from September 2008. Its four phases hold up, but its examples, such as kernel flaws and buffer overflows, come from host and network testing. Pair it with the OWASP WSTG for a web app.
Is the OWASP Testing Guide a pentest methodology?
It is a catalogue of web application test cases with a testing framework around it, and PCI's guidance lists it among the industry-accepted methodologies. The latest release is v4.2, from December 2020, and OWASP is developing v5.0. Cite its test IDs with the version, as in WSTG-v42-ATHZ-04.
Can an automated pentest follow a methodology?
Yes, for the phases software does well: reconnaissance, mapping, discovery, exploitation of known flaw classes with proof, and retesting. Scoping decisions, business logic and a report an auditor will accept still need people. See automated penetration testing.
How soon after a pentest should I retest?
As soon as each fix ships. PCI's guidance asks for remediation and retesting within a reasonable period after the report, and warns that a long delay may call for a new test because the environment has changed. For an app that deploys every day, retesting on every deploy is the practical answer.
Sources
- 1.SP 800-115, Technical Guide to Information Security Testing and Assessment, NIST Computer Security Resource Center
- 2.SP 800-115 (PDF): section 5.2, penetration testing phases, and section 8.3, remediation and mitigation, NIST
- 3.Information Supplement: Penetration Testing Guidance, version 1.1, PCI Security Standards Council
- 4.Web Security Testing Guide, OWASP Foundation
- 5.Release v4.2, OWASP WSTG on GitHub
- 6.How to reference WSTG scenarios, OWASP WSTG on GitHub
- 7.WSTG v4.2: Penetration Testing Methodologies, OWASP Foundation
- 8.WSTG v4.2: Testing for Insecure Direct Object References (WSTG-ATHZ-04), OWASP Foundation
- 9.The Penetration Testing Execution Standard, main page (Internet Archive copy of pentest-standard.org, 1 October 2026), PTES
- 10.OSSTMM, ISECOM
- 11.OSSTMM 3, ISECOM
- 12.Security testing of your Supabase projects, Supabase Docs
- 13.Penetration testing on Vercel, Vercel
- 14.Understanding API keys, Supabase Docs