A user changes /api/invoices/1024 to /api/invoices/1025 and gets someone else's invoice back. Nothing crashed, no payload was needed, and every unit test passed. That's the kind of bug web application security testing exists to catch. The 2026 Verizon DBIR says 31% of breaches now start with a software vulnerability, ahead of stolen passwords. This guide covers the methods, a step-by-step process, and the tools for each stage.
What Is Web Application Security Testing?
Web application security testing is the practice of finding security vulnerabilities in a web application, its APIs, and its dependencies before an attacker does. It combines automated tools and manual testing to check the source code, the third-party packages, and the running app as an attacker would reach it.
The scope is wider than "scan the site." A real test plan covers authentication, sessions, access control, input handling, configuration, and business rules. The OWASP Web Security Testing Guide (WSTG) provides a coverage framework: version 4.2 is current, and 5.0 is in development. Its categories run from information gathering and configuration through authorization, business logic, client-side, and API testing.
Why Web Apps Need Their Own Testing Approach
A web application combines several components: a browser front end, the APIs behind it, an identity provider, and open source packages, all reachable from the internet. The test plan needs to cover the interactions between those components.
- Every front end is an API client. Single-page apps talk to the same endpoints an attacker can call directly with
curl, so hiding a button in the UI doesn't protect the endpoint behind it. - Authentication and sessions are complex. OAuth flows, cookies, and token refresh all have to be tested from the outside, with real logins.
- Access control fails silently. Broken access control is #1 in the OWASP Top 10:2025, and OWASP found some form of it in every application it tested. These bugs return a clean
200, so they don't show up as errors. - A quarterly scan does not cover endpoints or behavior added after it runs.
For the attacker's view, see our rundown of common web application security threats.
Types of Web Application Security Testing
The general types of software security testing all apply here. Compare what each method inspects, when it runs, and what falls outside its coverage.
| Method | What it tests | When it runs | Finds | Misses |
|---|---|---|---|---|
| SAST | Source or compiled code (white box) | IDE, pull request | Injection patterns like SQL injection, with file and line | Access control, authentication, and config issues not visible in code |
| SCA | Third-party and open source dependencies | Pull request, build | Known vulnerabilities in packages | Flaws in your own code |
| DAST | The running app, from the outside (black box) | Feature-complete, CI, and staging | XSS, SQL injection, path traversal, and server misconfiguration | Anything behind a login it isn't configured to use |
| IAST | The running app, from sensors inside it | QA and automated test runs | Vulnerable code paths as tests exercise them | Code your tests never execute |
| API security testing | REST, GraphQL, SOAP, and gRPC endpoints | CI, staging | BOLA, BFLA, broken auth, and data exposure | Endpoints missing from the spec, unless discovery finds them |
| Penetration testing | The whole web application, by a human | Before major releases, on a schedule | Chained exploits and business logic abuse | Anything shipped after the test ends |
Static application security testing (SAST)
SAST reads source or compiled code without running it and flags known-bad patterns, like user input concatenated into a SQL string, down to the file and line. Its view is limited to the code it can analyze. Authentication and access-control flaws are difficult to detect this way, false positives need triage, and deployment configuration may be absent from the code entirely. Our guide to static application security testing goes deeper.
Software composition analysis (SCA)
SCA inventories your dependencies and matches them against publicly disclosed vulnerabilities. Every package from npm or PyPI is code you didn't write but still answer for. Run SCA on every build, not only when someone remembers to bump the lockfile.
Dynamic application security testing (DAST)
Dynamic application security testing (DAST) sends real requests to the running app and judges the responses. That's how it finds problems that only exist at runtime, like injection that actually executes or an endpoint that returns data it shouldn't. Our DAST engine, HawkScan, is built to run where developers work, locally or in CI, configured from a YAML file in the repo.
API security testing
Behind every single-page app is an API, and attackers call it directly. API testing works from the spec (OpenAPI, a GraphQL schema, or gRPC definitions) and checks each endpoint for broken authentication and authorization. The OWASP API Security Top 10 lists broken object-level authorization (BOLA) as API1 and broken function-level authorization (BFLA) as API5. For tooling, see our roundup of API security testing tools.
Penetration testing
Web application penetration testing covers what automation can't, like chaining a minor info leak into an account takeover or abusing a refund flow no scanner has a rule for. Use penetration testing for high-risk scenarios when you have the resources to investigate them in depth. The catch is that a pen test is a snapshot, and the app keeps changing after the report lands.
What to Test in a Web Application
The OWASP WSTG categories make a good coverage checklist. These are the areas that matter most for a typical web application:
- Configuration and deployment: exposed admin interfaces, risky HTTP methods, missing HSTS, and leftover backup files.
- Authentication: default credentials, weak lockout, password reset flows, and ways to bypass the login entirely.
- Session management: cookie attributes, session fixation, CSRF, and whether logout and timeouts actually end the session.
- Authorization: can user A read user B's objects (IDOR/BOLA), and can a standard user call admin functions (BFLA)? Our breakdown of broken access control covers the common patterns.
- Input validation: SQL injection, cross-site scripting, command injection, and SSRF on every parameter, header, and JSON field.
- Business logic: forged requests, skipped workflow steps, functions used more times than allowed, and malicious file uploads.
- Client-side: DOM-based XSS, client-side redirects, CORS, and what's sitting in browser storage.
- APIs: every endpoint in the spec, plus the ones that aren't in it.
If you need written requirements to test against, the OWASP ASVS turns these areas into verifiable controls. Testing tells you what's broken. For what to fix and how to harden it, use our web application security checklist.
How to Perform Web Application Security Testing, Step by Step
Place each test where its findings can inform the next development step.

- Scope the app and its APIs. List the hosts, environments, and API specs in play, plus what's off-limits, like a payment provider you don't own.
- Threat model the risky flows early in the software development lifecycle. Login, password reset, payments, file upload, and admin functions come first. Write down who should be able to do what, because that list becomes your access control test cases.
- Run SAST and SCA on every pull request. They need no running app, so there's no reason to wait. Fail the build on new high-severity findings and keep the rest visible.
- Run DAST against the running app before the PR, then again in CI/CD. Test a feature as soon as it's complete, while the developer (or agent) still has full context. In the CI/CD pipeline, HawkScan's
failureThresholdsetting sets the lowest severity that fails the scan, and with it, the build. Include dynamic testing in the automated test suite so it runs as part of the development workflow. - Test APIs from the spec, with authentication. Point the scanner at your OpenAPI file or GraphQL schema to seed documented endpoint coverage, and give it real credentials plus test data each test user owns. Then compare what it scanned against what you ship, because a route missing from the spec only gets tested if crawling or another discovery method finds it. An unauthenticated scan of an authenticated app mostly tests your login page.
- Test access control and business logic with more than one user. Use at least two test users, and more when needed, to check access across different owned objects and privilege levels. Our multi-user business logic testing automates this with multiple user profiles, such as admin, member, and guest, and shows the request and response for both the privileged and unprivileged user.
- Pen test high-risk apps on a schedule. Bring in humans for apps that handle money, health data, or admin control, and hand over your threat model so they don't spend days rediscovering it.
- Fix, rescan to verify, and track over time. A finding isn't closed until the request that triggered it comes back clean, which is how a StackHawk rescan works: it replays that request and checks the response. Track repeat findings by team, since a recurring vulnerability class points to a missing guardrail.
The steps overlap on purpose. An automated scanner can flag issues that are not vulnerabilities and miss issues that are. Combining scanners or testing methods helps cover those gaps.
Web Application Security Testing Tools
Start with one tool per stage, running on every change, before adding more. For full comparisons, see our guides to application security tools and DAST tools compared.
| Category | Open source examples | Commercial examples |
|---|---|---|
| SAST | Semgrep Community Edition | SonarQube, Semgrep Code |
| SCA | OWASP Dependency-Check | Semgrep Supply Chain, SonarQube Advanced Security |
| DAST | ZAP | StackHawk, Burp Suite DAST |
| Pen testing toolkit | ZAP | Burp Suite Professional |
Expect to spend time triaging SAST findings and tuning rules to your stack, since false positives are a known limitation. OWASP ZAP is a free, open-source DAST tool and a good place to learn what dynamic scanning finds. If your app has a login, though, ZAP has to be configured to handle it, or it can't reach anything behind it. We built StackHawk on the ZAP engine and packaged it for developer workflows, with YAML config in the repo, CI integrations, and support for REST, GraphQL, SOAP, and gRPC APIs.
Testing Web Apps Built With AI Coding Agents
An agent can write an endpoint, its tests, and a migration in one session. If the first security test is a nightly scan, the finding arrives after that development session.
So run the runtime test at the moment the code is written. That's what Wingman does inside Claude Code, Cursor, GitHub Copilot, Codex, and Antigravity. When the agent reaches feature-complete, Wingman boots the app, and HawkScan sends real HTTP requests to it. The agent gets the finding and fixes it as a normal git diff in your working tree, and a rescan confirms the issue is gone before the PR opens. CI gets a clean signal, and the security team gets an attestation tied to the commit.
Take the invoice bug from the intro. The agent adds GET /api/invoices/{id} and checks that the user is logged in, but not that the invoice belongs to them. A scan configured with two user profiles logs in as user A, requests user B's invoice, and gets a 200 with B's data. The agent adds the ownership check, the rescan replays the same request, and this time it's refused.
For a local Wingman scan against an app on the developer's machine, scan traffic stays local. The StackHawk platform receives findings and application profiles, not source code. The agent can also generate the HawkScan config itself, which stays short enough to review. For example, this configuration points to a local API. Replace the application ID and supply its OpenAPI file; the target must be running and the scanner already authenticated.
app:
applicationId: your-app-id
env: Development
host: http://localhost:3000
openApiConf:
filePath: openapi.yaml
hawk:
failureThreshold: high
It doesn't replace SAST, SCA, or a pen test, but it closes the gap between "the agent wrote it" and "someone tested it running."
Use overlapping web application security checks at defined points in development. If your team ships with coding agents, the runtime test belongs in the agent's loop. Start a 14-day free trial of Wingman, no credit card required ($10 per user per month after). Covering every app in your org? Talk to us about Scale.
Web Application Security Testing FAQ
Run SAST and SCA on every pull request and DAST against the running app at feature-complete and in CI. Add authenticated API and multi-user tests before release, pen test high-risk apps on a schedule, and rescan to verify every fix.
Usually SAST, DAST, IAST, and SCA, with penetration testing as the manual layer on top. For web apps, API security testing deserves its own slot too.
SAST. SonarQube analyzes source code, including taint analysis that tracks data flow to find injection flaws, and also offers secrets detection, plus SCA through its paid Advanced Security product (Enterprise edition and up). It doesn't test a running app, so pair it with a DAST tool.
Yes, when you have written authorization from the system's owner. NIST SP 800-115 calls for an assessment plan that names who is authorized to test, and external testers should keep a signed copy. Any third party that owns part of the environment usually has to consent in writing too. Without that authorization, don't test.
Automated tests on every change: SAST and SCA on each pull request, DAST at feature-complete and in CI. Pen tests on a schedule and before major releases, especially for apps that handle sensitive data or money.



