Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Sign in or join

        Threat modeling: a worked application example

        Threat modeling connects a feature, its trust boundaries and its possible abuse to controls you can test. This example follows a fictional report-sharing service.

        Checked 23 November 2026

        A report-sharing feature

        Maple Freight lets a signed-in dispatcher share a shipment report with a colleague. The report belongs to a tenant and an owner. A worker retrieves a document from an approved service; an email carries a short-lived link. The business wants the colleague to read that report without gaining access to the rest of the tenant.

        List the assets before naming attacks: the report content, the recipient identity, the signing key and the tenant boundary. Draw the browser, API, worker, document service and email recipient as separate actors. Mark the data that crosses each boundary. The browser’s shipment identifier is a request, not evidence of permission.

        Threats and evidence

        Boundary Possible abuse Control Verification
        Browser to API A dispatcher supplies another tenant’s report ID Check tenant and permitted relationship An owner ID reused in another tenant still receives 403
        Shared link to API A recipient alters the report or audience Verify signature, claims and expiration Altered token, wrong audience and expiry equality all fail
        Worker to document service A supplied destination reaches an internal service Fix the destination or validate an exact allowlist A suffix host and a redirect to an internal host fail
        Failure to browser A trace reveals credentials Return a generic error and incident ID Public response omits secret, stack and internal host

        These are hypotheses about this feature. The model needs revisiting if reports become public or a partner can delegate access. Name the owner of each control and the condition that would invalidate its assumption.

        A reviewable decision

        Write a decision such as: “The API authorizes the authenticated caller for this tenant and report before issuing a recipient-scoped link. The worker fetches only the fixed document origin. Failed permission checks deny access and produce an incident identifier.” Then link each sentence to a test and an owner. A diagram alone cannot show that these controls run.

        Practice the tenant and fetch boundaries in the Application security Hub. Use the secure code review guide to turn a threat into a reproducible finding. The browser’s fictional network cannot test DNS rebinding, production key rotation or concurrent authorization changes.

        The new lessons and practical interviews in this extension are in English. Earlier translated lessons retain their native versions.

        Sources

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        Your account can start a 5-day free trial: every course, unit, project and exam. Card needed; cancel any time and pay nothing.

        New accounts get 6 hours of full access: every course, unit, project and exam. The clock starts when you go past the free lessons.

        Plan your practice from a job ad or syllabus

        Have a referral code?

        or

        You can keep practicing without an account.

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.