A single-page application can show several screens without loading a new page, while its data and actions travel through APIs and an identity flow. A penetration test limited to the initial HTML document, or to a crawl of visible screens, can miss the decisions that protect records and transactions. The buyer's scope has to identify what runs in the browser, what the associated APIs enforce, and how a session survives navigation, refresh and logout.
Quick answer. A single-page application penetration test should follow important user journeys from browser route to associated API, test the server's authorization decision with controlled roles and objects, and validate session, OAuth, browser storage and client-side data handling under an agreed safety plan. Ask for evidence showing both an allowed action and a denied action, the final business state, and any untested routes or APIs. Stingrai's web application service covers authenticated roles, associated APIs, sessions, DOM-based XSS and business logic.
This guide is for a security or product leader comparing quotes for a React, Vue, Angular or other browser-driven application. It is about the purchasing boundary, not a framework-specific vulnerability catalog. The broader web application scope and cost guide explains general web testing. Here the distinctive problem is that the screen, browser state, identity provider and API may each give a different answer to the question, “Is this action allowed?”
Define the application as a journey, not a URL
Start with the product's meaningful journeys: sign in, view a record, create or modify it, invite a colleague, approve a transaction, export data, and sign out. A SPA may use one document URL and many client-side routes. Counting hostnames or HTML pages therefore tells bidders little about the amount of logic or authorization work. Name the route families and business outcomes that matter, then identify the API calls each journey makes. A route can have several read and write calls, and an API call may exist without a visible route.
Give the provider the deployed build or release identifier, application origins, environments, route list, API definitions where available, and the identity provider or session architecture. Mark which flows are public, customer-facing, staff-facing, support-facing and administrative. If there are separate preview, legacy or mobile-consumed endpoints, state whether they are part of this web application scope. A proposal that says “the website and its API” should be rewritten to name the actual hosts and method families.
The provider should map the running product as well as the documentation. OWASP's Web Security Testing Guide treats client-side testing as a distinct domain, while its authorization work checks the server's decisions for authenticated roles. The useful deliverable is a tested route-to-request inventory with selected business paths, not a claim that every line of a compiled JavaScript bundle was inspected. Unused code, feature flags and old API versions should be recorded when discovered, but a buyer should not assume discovery equals deep testing.
Agree on what constitutes one application. A SPA served from one origin may call an authentication domain, a first-party API, an upload service and a partner endpoint. The web and associated first-party APIs can be one scope if written that way. An identity provider's own platform, a third-party service, an internal network and cloud infrastructure are different owners and permissions. The engagement can inspect the application's use of those boundaries without silently probing systems outside the statement of work.
Test the browser and the API as separate decision points
A SPA can hide an administrative route or disable a button for a lower-privileged user. Those interface choices improve usability but do not establish that the associated API will deny the operation. The OWASP Authorization Cheat Sheet says permissions should be validated on every request, including requests initiated by Ajax. The buyer should ask the tester to compare what the screen permits with what the server accepts, using only authorized test identities and synthetic records.
For each priority journey, require a positive control and an agreed negative case. The positive control proves that a permitted identity can complete the intended action. The negative case uses a lower role, a peer record, an expired session or another condition the policy should reject. The evidence should identify the browser route, associated API operation, caller role, object relationship, expected policy, observed response and final state. A disabled button plus an untested API is incomplete evidence. A rejected API response without checking the resulting state can also be misleading when asynchronous work is involved.
Keep object access and function access distinct. OWASP API1:2023 concerns whether a user can act on a particular object, while API5:2023 concerns whether the user can call the function at all. A staff member may be allowed to open an invoice viewer but not another customer's invoice. An ordinary customer may be barred from the export function entirely. Those are different tests, even if both appear on the same SPA screen.
Direct API testing matters because the browser may normalize requests, omit optional fields or never expose a dormant endpoint. Stingrai's API service describes testing directly outside the interface across in-scope roles. The quote should say whether that direct work is included and how it maps back to the visible journey. Conversely, an API-only test may miss client-side handling, route transitions and misleading state in the browser. Both sides belong in a SPA purchase when the product's risk spans both.
Make the identity architecture a scope input
Before asking a vendor to “test OAuth,” explain which of three broad patterns the application uses. IETF RFC 10017, published in August 2026, describes a backend-for-frontend (BFF), a token-mediating backend and a browser-based OAuth client. These differ in where tokens live and which component makes API calls. A tester needs that architecture to assess the right boundary. A cookie-backed BFF test is not the same as a browser-held access-token test, and a product can use different patterns for different routes.
Supply a diagram or short written description of login initiation, redirect, callback, token or cookie handling, API request path, refresh, logout and account disablement. Mark the issuer, client identifier, redirect origins and permitted test realm without placing credentials or client secrets in the scope document. If the browser itself is an OAuth public client using the authorization-code grant, RFC 10017 says it must use PKCE. The assessment can verify that configuration and the application's redirect handling under the authorized test plan. A provider should not claim that every SPA requires identical token storage or that one storage choice eliminates all script risk.
Ask what “logout” is expected to mean in this product. Does it end the local application session, the identity provider session, or both? Should a previously loaded tab or another browser session still work? OWASP WSTG's logout test calls for server-side session invalidation, not just a visual sign-out message. An API request after logout and a fresh reload answer different questions from a back-button screenshot. Define the intended policy and test it with synthetic data and controlled accounts.
Session expiry, role changes and account disablement also deserve named cases where material. A route may continue showing cached data after the server denies a new request; that is a browser exposure question. An old token may continue calling the API; that is a session or token-lifetime question. A role-change test may depend on token refresh and application policy. The report should say which layer enforced the denial and whether displayed stale data remained accessible, rather than collapsing all of these into “logout failed.”
Include browser storage and offline behavior when present
Browser storage is part of the deployed application's attack surface. OWASP WSTG-CLNT-12 tells testers to determine whether sensitive data is stored client-side. The OWASP HTML5 Security Cheat Sheet specifically warns against storing session identifiers in local storage because JavaScript can access it. RFC 10017 analyzes trade-offs among browser token storage patterns. For procurement, ask the provider to inventory the actual storage used, test exposure and lifetime, and explain what the application can and cannot clear.
Do not turn this into a generic instruction to delete all browser storage. Some SPA products intentionally preserve harmless preferences and offline work. Supply the data-classification rule: which fields are public, which are sensitive, which may persist, and what should disappear on logout or role removal. A tester can then distinguish a design-approved preference from an exposed bearer token or cached customer record. Ask whether evidence will include a post-logout check on a shared device or newly opened tab when that threat matters to the product.
If the application has a service worker or offline mode, include its scope and cache behavior. OWASP warns that the Service Worker Cache API does not obey HTTP caching headers and entries do not expire automatically, so sensitive responses need explicit exclusion and cleanup. WSTG's browser-cache test separately addresses HTTP cache and history. Ask bidders whether they will inspect both mechanisms, because an HTTP Cache-Control header does not by itself prove that an application-managed offline cache is clear.
Where no service worker or offline feature exists, state that fact and keep the scope proportionate. The buyer does not need a speculative cache assessment of technology it has not deployed. The report should record the observed storage mechanisms, sensitive-data exposure test and exclusions. It should avoid listing every cache entry as a finding when the entry is intentionally public.
Scope client-side data handling beyond the login page
SPAs often render API responses into templates, components and DOM nodes. OWASP WSTG-CLNT-01 explains that DOM-based XSS can occur in browser-side JavaScript without the server reflecting the content. A provider that only searches server responses for reflected input may therefore miss the route and component where untrusted data reaches the browser. The quote should include the client-side surfaces most likely to process user or partner-controlled content.
Name those surfaces in product terms: search results, comments, document names, support messages, import previews, rich-text fields, shared links and data returned from integrations. The tester should trace selected untrusted inputs through the running interface and, if source access is available, examine the component's data handling. The objective is a safely demonstrated browser effect and a fix location, not a list of possible payload strings. If the scope excludes third-party widgets or embedded content, name them and explain who owns their authorization and remediation.
Route parameters and fragments deserve attention because the browser may use them without sending the value to the server. A route guard may also rely on client state that is easy to change but has no security value unless the API enforces the same rule. Ask for a few representative routes under each high-risk role and state. A crawler can map many paths, but someone must interpret how the client constructs requests and what the returned data means to the business.
Cross-origin behavior is another separate boundary. OWASP WSTG-CLNT-07 explains that CORS controls whether a browser can read a cross-origin response and still requires application-level protection for sensitive data. Give bidders the intended browser origins, credential mode and cross-origin integrations. A CORS finding should explain what origin can read which response with which credentials, rather than treating any permissive header as equivalent to an authorization breach. Direct API authorization must still be tested independently.
Turn the scope into an evidence map
The following original buyer map combines the WSTG client-side, session and authorization domains with RFC 10017's identity architecture. It is not a claim that OWASP requires this exact worksheet. Replace the sample artifacts with the controls your product actually uses.

Figure 1: Editorial map from browser journey to API outcome. Sources: OWASP WSTG; IETF RFC 10017.
Boundary | Buyer provides | Provider returns |
|---|---|---|
Browser journey | Route families, sensitive views and deployed build | Tested routes, client-side observations and exclusions |
Identity and session | Login pattern, controlled accounts, intended expiry and logout rules | Session path, allowed and denied states, point of enforcement |
Associated API | API inventory, role policy and synthetic objects | Caller, request, authorization decision and response evidence |
Business outcome | Reversible record and expected final state | Before and after state, including asynchronous effects |
Client storage | Sensitive-data classification and offline design | Storage mechanisms, exposure and cleanup result |
Remediation | Engineering owner and retest route | Reproduction context, fix guidance and comparable retest |
Use the table to compare bids on the same work. One quote may include browser and API authorization, while another scans the document origin and tests only anonymous API requests. One may include SSO and post-logout checks; another assumes they are out of scope. The cheaper number has no meaning until the included boundaries, buyer dependencies and exclusions match. Ask vendors to mark each row included, excluded or dependent on access, then describe the test depth within it.
The evidence map also helps prevent overclaiming after delivery. A route list proves mapping; it does not prove authorization. An API response proves a decision for one caller and object; it does not prove every user can never cross that boundary. A client-storage screenshot proves what was observed in one browser state; it does not prove an offline cache is always purged. A strong report names the tested build, fixture and limit so the next release or retest can repeat the decision.
Set a safe test environment and useful fixtures
Many SPA checks can be performed against production with narrow, authorized accounts and synthetic records. Other checks, including state-changing workflows, bulk exports or resource limits, may belong in a representative staging environment. The proposal should name permitted origins, API hosts, identity realm, test source addresses where needed, hours, prohibited actions, monitoring contacts and a stop route. A generic authorization to test “the site” is too vague when a browser app calls several independently owned systems.
Provide at least two controlled identities when the important question is separation between peers, and a higher and lower role when the important question is privilege. Add representative objects with known ownership and field values. For session checks, supply an account that can be disabled or have its role changed without affecting a real employee. The buyer should also explain whether MFA and SSO are in scope and how the tester will reach a stable test state without bypassing production safeguards. Every special test access path should be documented so the report does not confuse a test-only exception with the deployed control.
If there is a rate-limited or high-impact flow, agree on a bounded method before execution. A normal pentest should not create live payments, send mass notifications, exhaust quotas or cause an outage merely to demonstrate a risk. A synthetic transaction or a stopped-before-commit proof may be enough to show that a lower role reached a protected action. The report should state what it observed and what remains unproven because of the agreed safety limit.
Staging can also mislead if its configuration differs materially from production. Ask for the differences in identity settings, CORS origins, API gateway policy, cache configuration and feature flags. A provider may verify a safe logic case in staging and a non-disruptive configuration condition in production. The evidence should name which environment supports each conclusion. Avoid the phrase “production secure” if only a staging build was exercised.
Ask for a report that separates failure classes
The report should identify whether a finding sits in client rendering, browser storage, session lifecycle, API authorization or business logic. That assignment determines who can fix it. A client route showing a restricted menu item is not the same as an API serving a restricted record. A stale view after logout is not the same as a still-valid server session. A permissive CORS header is not the same as a function-level authorization failure. The report should include the expected behavior, observed behavior, affected identities and data, plus the environment and build.
Ask for coverage as well as findings. The provider should list selected route families, API operation families, roles, session states, storage mechanisms and cross-origin hosts. It should name excluded partners, untested roles, missing fixtures and features not deployed. A “no critical vulnerabilities” summary without this scope record is hard for a buyer or enterprise customer to interpret. A bounded, transparent test can be valuable even when it has no confirmed finding.
Retesting should repeat the same controlled decision after remediation. If an API object-access flaw was fixed, confirm the forbidden identity is denied and the permitted identity still works. If a logout issue was fixed, test a new API request and the relevant browser history or cache case separately. If client rendering was fixed, verify the affected component and route under the same type of untrusted data. A retest that only checks the visible button can miss the server behavior that caused the original risk.
For a frequently changing SPA, decide which changes justify another full assessment and which can use targeted retest. New route families, identity architecture, privileged flows, API authorization policy and service-worker behavior are stronger triggers than a visual redesign. Stingrai offers one-time or annual assessments as well as continuous programs; the right cadence follows release and risk, not an arbitrary claim that every customer needs a subscription.
Compare proposals with these buyer questions
Which deployed origins, route families, API hosts, environments and builds are included?
Will testers follow selected browser journeys through the associated API and verify final state?
Which controlled roles, peer accounts and synthetic objects do you need from us?
How will you assess our actual BFF, token-mediating backend or browser OAuth client pattern?
Are session expiry, logout, role changes, storage and offline caches included where deployed?
How will you choose client-side input flows and assess DOM-based issues safely?
Will you distinguish CORS browser exposure from server-side authorization?
What report artifact will show tested paths, excluded paths, evidence and retest results?
A bidder's answers should become part of the statement of work. Require a small coverage appendix or sample report so the team can see how a tested path is recorded. Ask who will perform the manual reasoning for role policy and business outcome, how automated coverage is reviewed, and whether the tester can discuss findings with engineers while the application is still fresh in mind. These questions are more useful than requesting a single tool name or a broad promise to “cover OWASP.”
Where Stingrai fits
Stingrai is a CREST-accredited penetration testing company founded in Toronto. Its web application penetration testing covers authenticated roles, session management, access control, DOM-based XSS and business logic, while its API service tests associated APIs directly outside the interface. For a SPA, the buyer should supply the route and API inventory, identity architecture, role policy and synthetic fixtures so the engagement can follow the decisions that matter.
Stingrai offers human-led testing and a hybrid web application engagement. In the hybrid option, Snipe and named penetration testers work alongside one another throughout the assessment: Snipe maps and tests the web application and associated APIs, while the testers investigate authorization and business impact, validate findings and develop the report. The published package boundary is one web application and associated APIs. Other applications, network infrastructure and cloud platforms need their own written scope. The buyer can choose a one-time or annual engagement, or a continuous program, according to its release pattern.
Frequently Asked Questions
What should a single-page application penetration test include?
It should cover the deployed browser routes, associated APIs, authentication and session flow, authorization across in-scope roles and objects, client-side data handling, browser storage and relevant cross-origin behavior. Require positive and negative cases for important business journeys, plus a coverage record that names exclusions. The exact depth depends on the application's architecture and the controlled access the buyer provides.
Is a scan of the SPA's public URL enough?
No. A SPA can load one HTML document while placing business actions in associated APIs and sensitive state in the browser. An anonymous scan can map part of the surface, but authenticated roles, synthetic objects and direct API work are needed to evaluate protected business decisions. A quote should name those inputs and the paths the provider will test.
Does a SPA penetration test have to include its API?
If the API performs the application's data and business actions, the relevant associated API operations belong in the scope. The browser interface cannot prove server-side authorization by hiding a route or button. Write the API hosts, operation families and permission decisions into the statement of work, and list any separate third-party or infrastructure systems as distinct permissions.
How does OAuth architecture change the test?
The test follows where the application keeps tokens, how the browser reaches the resource server, and which component owns the session. IETF RFC 10017 distinguishes BFF, token-mediating backend and browser-based client patterns, each with different evidence needs. Give the provider the actual flow and approved test realm; ask it to verify the deployed controls rather than assuming one generic SPA pattern.
Should the tester inspect local storage and service-worker caches?
Yes, when the application uses them. The tester should determine whether credentials or sensitive data persist in browser storage and whether offline caches retain protected responses after logout or role change. OWASP warns that local storage is accessible to JavaScript and that the Service Worker Cache API does not automatically obey HTTP caching headers or expire entries. The report should distinguish intentional public caching from sensitive-data exposure.
Can logout testing stop at the sign-out screen?
No. A sign-out screen does not prove that the server rejected later requests or that sensitive browser data disappeared. OWASP WSTG calls for checking server-side session termination. Ask for an API request after logout, a fresh reload and any relevant history or storage check, each tied to the product's intended sign-out policy.
Is CORS testing the same as API authorization testing?
No. CORS determines which browser origins can read a cross-origin response, while API authorization decides whether a caller may use a function or object. A useful assessment tests the intended origins and credential mode, then separately checks server-side role and object decisions. The report should identify which boundary failed and what data or action was actually reachable.
What evidence should an enterprise buyer request?
Ask for the deployed build and environment, tested route-to-API paths, controlled caller and object fixtures, expected and observed decisions, final state, storage and session observations, exclusions, confirmed findings and comparable retest results. The report should separate client, identity, API and business-logic causes so engineering can assign fixes and security can explain the remaining coverage limits.


