Privacy engineering

Prepare a Threat Model for a Small Web Application

Run a focused threat-modeling session for one web feature, connecting concrete failure scenarios to owners, controls and verification work.

A small application’s threat model should help the team make a decision about a real feature. Begin with a bounded journey, identify the information and actions that matter, and write plausible ways those expectations could fail. End with specific responses and a way to check them. A list of security terms without a connection to the application is difficult to prioritize or maintain.

The OWASP Threat Modeling Cheat Sheet describes threat modeling as a structured, repeatable activity that should evolve with the system. It emphasizes understanding the system, identifying threats, choosing responses and reviewing the result. The workshop below is an original practical format for a small team. It does not replace specialist assessment when the application’s risks require one.

Choose one feature and one decision

Suppose a fictional client portal is adding document sharing. A project member will upload a file and invite another member to read it. The first decision is whether the proposed sharing flow has sufficiently clear boundaries to proceed to implementation. That is a manageable scope for a session; “review the security of the entire company” is not.

Write the feature’s intended behavior in a few sentences. Identify who can initiate the action, what successful completion looks like and what should never happen. For this example, a document should remain associated with the correct project, and an invitation should not make every project document public. These expectations give the discussion something concrete to test.

Record the version of the design being reviewed. A model of last month’s architecture may still contain useful thinking, but it should not be presented as a review of a new upload provider or a changed sharing policy. Date and version are part of the model’s meaning.

Bring the people who know the boundaries

A useful session needs knowledge of the feature, its implementation and its operation. That may mean a developer, a product owner and the person responsible for the hosting environment. If customer support will retrieve documents or manage invitations, their workflow belongs in the discussion as well.

Do not require everyone to use the same security vocabulary before contributing. A support colleague who asks what happens when an invitation reaches the wrong recipient may identify an important scenario. Translate the concern into the model rather than dismissing it because it did not arrive as a formal threat category.

Assign a facilitator to keep the discussion connected to the feature and a recorder to capture decisions. In a very small team, one person may perform both roles, but someone must own the resulting work. Otherwise, the session can produce a good conversation and no change to the system.

Draw a diagram that can be corrected

Show the browser, application, identity service, document storage and notification provider. Add the data paths involved in uploading and sharing. Mark where control changes, including external services and user-controlled clients. The diagram should be simple enough that a participant can point to a missing path without needing to understand every deployment detail.

Ask what the diagram assumes. Does the application generate storage names? Does a download request check current project membership? Does a notification contain a direct storage link? Each answer should be marked as confirmed, proposed or unknown. This prevents an attractive diagram from converting an unverified assumption into an apparent control.

Use the data flow mapping exercise if the team cannot yet explain where copies go. A threat model can contain unknowns, but it should identify them clearly and assign the investigation needed to resolve them.

Write scenarios as complete sentences

A useful scenario names a condition, an action and an unwanted result. “An invited account whose membership has been removed can still retrieve a previously generated download link” is more actionable than “authorization risk.” It identifies both a lifecycle change and the access path that needs examination.

Keep the scenarios tied to the actual feature. A general checklist may prompt discussion, but it should not replace application-specific reasoning. For the document portal, consider mistaken recipients, cross-project access, uncontrolled file processing and abandoned uploads. For a different application, the relevant scenarios may be entirely different.

Avoid turning the session into a demonstration against a real third-party system. The model is a design and review activity. Any subsequent testing must use authorized systems and appropriate test data. A written scenario can be useful before anyone attempts to reproduce it.

Separate an existing control from a proposed response

A participant may say, “The storage service encrypts files,” and another may assume this resolves a sharing problem. Ask what outcome the control actually addresses. Encryption at rest does not by itself decide whether a download should be authorized for a particular account.

For each scenario, list the control already present and the evidence for it. Then list any proposed change separately. A configuration screenshot, test result or code reference can support an existing-control statement. A task in the backlog supports only a statement that work is planned.

Use precise language when evidence is incomplete. “The route is intended to check project membership” is different from “an integration test demonstrates denial after membership removal.” The difference matters when a team decides whether an unresolved scenario should block a release.

Prioritize with reasons people can challenge

A ranking is useful when it explains why one scenario needs attention before another. Consider the affected information or action, who could reach the path, the conditions needed and the likely consequence for the application. Do not assign a precise-looking numerical score merely because a spreadsheet offers a column for one.

Record uncertainty beside the ranking. If the team does not know whether an endpoint is exposed, investigating that fact may be the next action. Treating an unknown as low risk because no incident has been observed is not a reliable conclusion. Equally, every imaginable scenario need not receive the same response.

The responsible owner should make the release decision using the organization’s process. The model supplies evidence and unresolved questions. It should not imply that a facilitator has silently accepted risk on behalf of a business or customer they do not represent.

Turn the model into a short action register

The action register connects discussion to implementation. Each row should identify the scenario, response, owner and acceptance evidence. The following examples apply only to the fictional portal.

Scenario Proposed response Evidence to request
Former member retrieves a document Define and enforce current-access behavior Test after membership removal
Upload is processed before validation completes Separate receipt from processing eligibility Test rejected and interrupted uploads
Notification exposes unnecessary content Reduce the notification payload Inspect a synthetic delivery event
Abandoned files accumulate Define an approved cleanup rule Reconcile eligible files after a test run

Do not write “improve security” as the acceptance condition. Another person should be able to determine whether the specific response was implemented. Where the response is to investigate, the deliverable should be a documented finding that leads to a decision.

Review the response in the built system

After implementation, revisit the original scenario. Check whether the change addresses the unwanted outcome and whether it introduces another path that needs consideration. A new access check may fix the download endpoint while an export route still uses older behavior.

Use evidence appropriate to the control. A code review can show where a check is placed. An integration test can show behavior under a defined configuration. An operational exercise can show that an alert reaches an owner. These evidence types complement one another; none automatically proves every aspect of the system.

Preserve the unresolved items. A model with open questions is more honest and more useful than one whose findings disappear when the meeting ends. If the team accepts a limitation temporarily, record the decision, owner and review trigger through its exception process.

Update when the feature changes its shape

Revisit the model when a new recipient type, storage destination, processing step or integration changes the feature’s boundaries. A purely visual change may require little discussion, while a small “share publicly” checkbox can alter the access model substantially.

A periodic review can still help identify drift, but it should not be the only trigger. Link the model from the feature’s design or release checklist so someone making a relevant change can find it. Keep the most useful diagram and action register concise, with detailed evidence available through references.

A finished session leaves the team with a clearer picture of the feature, a set of reasoned decisions and testable work. The next step may be a specific authorization test or a review of the file-upload boundary. The value comes from that connection to the actual system, not from the number of threats written on a board.