Project: Secure Web Application Review
Review a small web app against the OWASP Top 10, test negative authorisation cases, inspect headers, and deliver a prioritised remediation report.
By the end, you’ll be able to…
- Build a repeatable web application review checklist.
- Inspect security headers, cookies, CORS, and error handling.
- Test authorisation and session behaviour with two synthetic accounts.
- Write findings with evidence, severity, and verification steps.
01Review the Design Before the Bugs
A web application review starts with understanding what the application is supposed to do. List the roles, the sensitive actions, the data each role can see, and the trust boundaries between browser, server, database, and third parties. Read the routes and the data model. Identify the places where an authenticated user could try to act outside their role.
Then choose a standard to structure the review. The OWASP Application Security Verification Standard (ASVS) provides testable requirements across authentication, session management, access control, validation, cryptography, and logging. The OWASP Web Security Testing Guide provides testing methods. You do not need to complete every check in a first review. Pick the requirements that match the application's risk.
Scope the review in writing. Which environment? Which accounts? Which URLs? What is explicitly out of scope? For a portfolio project, use a locally hosted application you built or a deliberately vulnerable training target in an isolated lab. Never test a public site without written permission.
02Inspect the Browser-Facing Controls
Capture response headers for the login page, an authenticated page, and an API endpoint. Check for HSTS, CSP, X-Content-Type-Options, Referrer-Policy, and a sensible Permissions-Policy. Inspect cookies for Secure, HttpOnly, SameSite, Path, Domain, and expiry. Check CORS preflight responses for wildcard origins or reflected origins with credentials.
Test error handling by requesting a missing page, sending malformed input, and triggering a server error in a lab. Confirm that the response does not reveal stack traces, framework versions, SQL errors, file paths, or secrets. Check that authentication failures use a uniform message and that the timing does not obviously reveal whether an account exists.
Review the client bundle for exposed configuration. Public API base URLs and client identifiers may be expected. Private keys, admin tokens, internal hostnames, and debug flags are not. Remember that anything shipped to the browser is public. Obfuscation is not secrecy.
# Capture headers for three representative pages.for path in / /login /api/me; do echo "=== $path ===" curl -sS -D - -o /dev/null "http://127.0.0.1:3000$path"done# Inspect cookies and CORS preflight in a lab.curl -sS -D - -o /dev/null -X OPTIONS \ -H "Origin: https://evil.example.test" \ -H "Access-Control-Request-Method: GET" \ http://127.0.0.1:3000/api/me# Check dependencies for known advisories.npm audit --omit=dev 2>/dev/null || trueHTTP/1.1 200 OK content-security-policy: default-src 'self' x-content-type-options: nosniff set-cookie: session=...; HttpOnly; SameSite=Lax access-control-allow-origin: https://evil.example.test
03Test Authorisation With Two Accounts
Create two synthetic users with the same role and one user with a different role. Log in as user A, record the identifiers of A's resources, then log in as user B and try to access A's resources by changing IDs, tenant values, query parameters, and request bodies. Also try A's session against admin routes. Every attempt should fail with a consistent 403 or 404, and the server should log the denied action.
Test state-changing requests for CSRF protection, especially forms and API endpoints that accept cookies. Check that logout invalidates the session, that password reset tokens are single-use and expire, and that changing a password revokes other sessions. Test session fixation by noting the session ID before and after login; it should change.
Document the exact request, the expected result, the observed result, and the impact. A screenshot is not enough; include the raw request and response where possible. Redact cookies and personal data. The report should let a developer reproduce the issue and prove the fix.
TEST: horizontal access control Account A owns invoice 1042. Request: GET /api/invoices/1042 with account B's session. Expected: 404 or 403. Observed: 200 with A's invoice. Impact: any customer can read another customer's invoice. Fix: scope the query by authenticated tenant and owner. Verify: repeat the request and expect 404; add an automated test.TEST: session rotation Request: GET /login, record pre-login session cookie. Log in, record post-login session cookie. Expected: different session identifier. Observed: same identifier. Impact: session fixation risk. Fix: regenerate the session on authentication. Verify: login twice and confirm the value changes.04Project Brief: The Web App Review Report
Choose a small app you own or a training target. Review at least ten controls covering access control, authentication, session management, injection, XSS, security headers, error handling, dependency hygiene, logging, and one business-logic abuse case. Include at least three negative tests with two accounts.
Deliver an executive summary, scope and method, findings table, detailed findings, positive observations, and a remediation plan. Rate severity using likelihood and impact. Distinguish confirmed issues from hardening opportunities. Include a retest plan for each finding.
A strong review does not just list failures. It explains the application's trust model, shows what you tested, acknowledges what you did not test, and gives the team a sequence of changes that reduces risk quickly. Redact secrets, cookies, and personal data from the published version.
# Web Application Security Review## Executive summaryTwo high findings: broken object-level authorisation and a session that does not rotate after login.No evidence of injection in the tested endpoints.## ScopeLocal lab build, synthetic users A/B/admin, 12 endpoints, 10 controls.## Findings### F-01: Invoice endpoint missing tenant scoping (High)Evidence, impact, reproduction, remediation, verification.### F-02: Session identifier not rotated after login (Medium)Evidence, impact, reproduction, remediation, verification.## Positive observationsParameterised database queries, HttpOnly cookies, CSP in report-only mode.## Not testedFile upload, payment provider webhooks, mobile client, load behaviour.## Remediation planNow: fix tenant scoping and add regression tests.30 days: regenerate sessions, enforce CSP, add audit logging.60 days: dependency scanning and quarterly access review.The ideas worth keeping.
- Review the application's roles and trust boundaries before hunting for individual bugs.
- Use ASVS and the OWASP Top 10 to structure coverage, not as a substitute for thinking.
- Test authorisation with multiple accounts and turn each finding into a regression test.
- A good report explains evidence, impact, limitations, and a verified remediation path.
Make it yours.
Type and test your code right here in the interactive workspace. Run your solution, check the output, and compare with the worked guide when ready.
Exercise 1: Write a header finding
A production response has no Content-Security-Policy, no HSTS, and sets a session cookie without Secure or HttpOnly. Write a finding with evidence, risk, impact, and three recommendations.
Explore a worked solution
Finding: missing browser hardening on the authenticated application. Evidence: curl -D shows no content-security-policy or strict-transport-security header, and Set-Cookie lacks Secure and HttpOnly. Risk: medium-high. Impact: XSS payloads are more likely to execute, session cookies can be stolen by script or sent over plaintext if HTTP is reachable, and users are more exposed to protocol downgrade. Recommendations: add Secure and HttpOnly to the session cookie, enable HSTS after confirming HTTPS everywhere, and deploy a strict CSP starting in report-only mode. Verify with curl and browser devtools, then add a CI header check.Header findings should connect each missing control to a concrete attack path. Do not recommend a header without explaining what it changes.
Exercise 2: Design an authorisation test
Describe a repeatable test that proves user B cannot read user A's invoice, including setup, request, expected result, and regression protection.
Explore a worked solution
Setup: create users A and B in the same tenant and a user C in another tenant; create invoice 1042 owned by A. Log in as B and send GET /api/invoices/1042 with B's session. Expected: 404 (preferred, to avoid confirming existence) or 403, with no invoice data. Repeat with C and with an unauthenticated request. Add an automated integration test that seeds the three users and asserts the status codes. Log denied access and alert on repeated attempts. Verify the fix by running the test in CI on every change.A good authorisation test is reproducible, covers horizontal and vertical boundaries, and becomes a regression test rather than a one-off manual check.
What stayed with you?
Check the ideas while they’re fresh. Your answers stay in this page and feedback appears as you go.
Keep exploring.
The official references behind this lesson, when you want a second angle or the full details.
Pause. Put the pieces together.
You’ve reached the end of Web Application Security. Before moving on, use this task to check what you can do independently.
Produce a web application review with reproducible exploit evidence, business impact, fixes, and retest evidence.
Try it in your own environment and write down the result. This is a self-check; reading completion does not evaluate your code.
Review this moduleOne lesson closer.
Reading is a start. Trying it yourself makes the connection.