Skip to content

M5-S3 — Security primer: STRIDE and the web-vulnerability classes

Section titled “M5-S3 — Security primer: STRIDE and the web-vulnerability classes”
ModuleM5 — Identity, access and security
After this session you canName the threat a design invites with STRIDE, and recognise the common web-vulnerability classes and the control that answers each.
Time44 min with a facilitator · about 41 min on your own
Before you startM5-S1 (how identity reaches a service) and M5-S2 (how the permission engine decides). No environment is needed: this session is reading, reasoning and practice.
Go deeperThe security boundary · Design your receiving endpoint

◆ Orientation (1 min) — A vocabulary for what can go wrong

Section titled “◆ Orientation (1 min) — A vocabulary for what can go wrong”

In ACE you wrote a suite’s security design and a short threat table for it (ACE M7-S2): a leaked token, a flooded form, a webhook that leaks data. That table was built from experience. In M5-S1 and M5-S2 you then saw where the platform establishes identity and how it decides access. A master needs one more thing before reviewing anyone’s design: a systematic vocabulary, so that the threats you find do not depend on what you happen to remember on the day.

This session gives you two such vocabularies, both used across the industry. STRIDE names the six kinds of harm a design can suffer. The web-vulnerability classes name the six mistakes that most often cause that harm in web systems. For each, you learn the control that answers it. In M5-S4 you put both to work in a full threat model of the Larkspur suite and its Condition Monitoring capability.

▤ Concept (16 min) — Six harms, six mistakes, and the controls that answer them

Section titled “▤ Concept (16 min) — Six harms, six mistakes, and the controls that answer them”

Three words are used loosely in everyday talk; keep them apart in your reviews.

  • A threat is something bad that could happen to something you value: a supplier’s bank account is changed to a fraudster’s, a work order is raised for a pump that is fine, the planners’ dashboard stops answering.
  • A weakness (or vulnerability) is the property of a design that lets the threat happen: the form that changes bank details does not check who is asking.
  • A control is what stops it, limits it, or at least makes it visible: the change needs a signed-in supplier contact and a call-back from Procurement before it takes effect.

What you protect are assets (data, money, availability, reputation). Who might do harm are actors, and not all of them are attackers: a stuck sensor and a well-meaning planner with too much access cause harm too. A trust boundary is any line across which the level of trust changes: from the internet to the platform, from the platform to an outside system, from a person to an automation that runs with more access than that person. Threats cluster at trust boundaries, which is why M5-S4 starts by drawing them.

STRIDE is a checklist of six categories. Each is the violation of one security property, so for any part of a design you can ask six questions and be fairly sure you have not missed a whole kind of problem.

LetterThreatProperty it violatesThe question to askTypical control
SSpoofingAuthenticityCan someone or something pretend to be another?Authentication: credentials, a shared secret or signature on every call, a second factor
TTamperingIntegrityCan data or code be changed by someone who should not change it, or in transit?Authorization on the server, validation, encrypted transport, history that cannot be edited
RRepudiationAccountabilityCould someone deny an action, and could we prove otherwise?An attributable identity on every change, audit history, logs that keep the correlation id
IInformation disclosureConfidentialityCan data reach someone who should not see it: on screen, in a log, a payload, an export?Least privilege, protected fields and masking policies, no secrets or personal data in logs
DDenial of serviceAvailabilityCan someone or something stop the service, or make it too slow to use?Limits and quotas, idempotent retries, back-pressure, capacity planning
EElevation of privilegeAuthorizationCan someone gain more access than they were given?Least-privilege grants, separate credentials per integration, review of powerful automations

What to notice: every row is one property and one question. A design element can invite several rows at once, and a control often answers more than one: least privilege appears under both I and E.

The categories become useful when you can see them in your own business. Here is each one in the Larkspur suite you have been studying.

Spoofing. Larkspur’s outside maintenance system (the CMMS) creates a work order for every request posted to its receiving address. If it never checks who sent the post, anyone who learns the address can pretend to be the platform and fill the planners’ queue with false work. The platform’s own front door does not have this problem, because every caller must present a credential that the edge checks (M5-S1); the CMMS’s door has it until the CMMS checks a secret.

Tampering. A purchase order’s value is changed after Sara Qasim approved it, so the supplier is paid for more than was agreed. The question is not only “can an attacker do this?” but “can anyone, including a colleague or an automation, change an approved value without a new approval?”

Repudiation. A supplier’s rating on the Supplier Scorecard drops, a contract review starts, and the supplier asks who changed it. If the change was made by a reaction running as System, the record’s history says the platform did it; nobody can show which person or which event set it off. The harm is not the change itself but the inability to account for it.

Information disclosure. The Bank Account field of Suppliers is protected so that only Procurement and Finance can read it (M5-S2). The same value can still leak if an automation copies it into a notification, a webhook payload or a log line. Disclosure happens on every path the value travels, not only on the screen.

Denial of service. A vibration sensor sticks and posts a reading every second. Each reading above the alarm threshold raises a work order and notifies the planner. Nobody attacked anything, yet the planners’ queue and the reaction engine are flooded. Availability is threatened by mistakes and success as often as by attackers.

Elevation of privilege. The telemetry integration’s application user is given Edit on the whole of Asset Maintenance “to be safe”, although it only needs to create meter readings. If its token leaks, whoever holds it can change assets and work orders too. The privilege was never stolen: it was given away.

STRIDE tells you what can go wrong. The vulnerability classes tell you the mistakes that most often make it go wrong in web systems. They are the same everywhere: in a web shop, a bank, or a solution built on Osos. You meet them here through generic examples and through the places a platform solution or its extensions could repeat them.

What it is. Text that came from a user is put into something that is then interpreted: a database query, an expression, a script, a shell command or a template. If the text contains syntax, it changes what the interpreter does. The classic example is a web shop that builds a database query by gluing a search box’s text into it; a visitor who types query syntax instead of a product name reads or changes data they should never reach.

Where it appears in a platform solution. Wherever an extension builds an expression, a filter, a query or a script as a string and includes text a person typed: a Function that assembles a filter from an asset tag typed on a handheld, a template that inserts a remark into code, a generator that writes a formula from a form field.

The control. Treat user text as data, never as code. Pass values as values: build a filter as a structured criteria object whose values are fields, not as a string; validate the type and format of every input at the server; use an allow-list where the set of valid values is known. This gives the course’s design rule, which you will apply in every review: never build an expression, a query or a script from user-entered text.

What it is. A user acts outside their permissions because the server does not check, or checks the wrong thing. Generic examples: changing the number in an address bar to open another customer’s invoice; a button hidden in the page but the action behind it still accepted; an administrator page that relies on nobody guessing its address.

Where it appears in a platform solution. The platform checks every request against the caller’s grants (M5-S2), so the classic “forgot to check” mistake moves to the edges you build: grants wider than the job needs; an application user with module-wide Edit; a Function that holds a powerful credential and acts on behalf of whoever calls it (a confused deputy, which does with its own access what the caller could not); a process that picks the record to change from an identifier the caller supplied instead of from who the caller is.

The control. Decide access on the server from the authenticated identity, every time. Give the narrowest grant that does the job, one credential per integration and per environment. A Function that acts for a person must act with that person’s access, or check it before it acts. Hiding a button is presentation, never a control.

What it is. Text an attacker supplied is shown in another person’s browser as active content, so it runs as a script in that person’s session. Generic example: a comment box whose contents are rendered as HTML on a forum; a comment containing a script runs for every reader and can act as them.

Where it appears in a platform solution. Anywhere your extension or a connected system renders text as HTML instead of as text: a custom web control that inserts a value as markup, a document or email template that treats a field as HTML, an outside system’s web page that displays the work order descriptions you send it.

The control. Encode output for the place it is shown: modern web frameworks escape text by default, so the mistake is to switch that off by inserting raw markup. Where rich text is truly needed, sanitise it against an allow-list of tags. Keep fields that people type as plain text, and when you send data to another system, agree on how it will be encoded there.

What it is. Another web site makes the victim’s browser send a request that the browser authenticates automatically, usually with a cookie. Generic example: a page that, when opened, silently submits a money-transfer form to the victim’s bank; the bank sees the victim’s session cookie and obeys.

Where it appears in a platform solution. An API that is called with a bearer token in a header, as ACE taught you to call the HTTP API, is not exposed to this in the same way, because a browser does not attach that header on its own. The risk returns wherever an action is authorised by something the browser or the mail client sends without the person meaning to: a cookie-based session on an outside system, or a one-click link in an email that changes data when it is opened (mail scanners open links too).

The control. Authorise state-changing actions with a credential the browser does not send by itself, or with an anti-forgery token; never change data on a simple link visit; ask for an explicit confirmation of high-value actions.

What it is. A server fetches an address chosen by an attacker. Because the server sits inside the network, it can reach places the attacker cannot: internal administration pages, a cloud platform’s metadata service, other tenants’ endpoints. Generic example: an “import profile picture from a link” feature that, given an internal address, fetches and returns an internal page.

Where it appears in a platform solution. A Function or an outbound call whose destination comes from record data: a “supplier certificate link” that a Function downloads, a callback address a partner registers, a webhook target a builder can type into a record instead of into reviewed configuration.

The control. Let configuration, not user data, choose where the server connects: an allow-list of destinations, fixed hosts with only parameters varying, no following of redirects to new hosts, and no fetching of addresses that resolve to internal networks. Prefer an upload over “give us a link and we will fetch it”.

What it is. A key, token or password is put where others can read it: in source code, a package, a URL’s query string, a log line, a run history, a ticket or a chat message. Generic example: an API key committed to a public code repository and found by a scanner within hours.

Where it appears in a platform solution. An outbound call’s key placed in the address (where it is stored with the run history and in the receiver’s access logs), a token pasted into a Function’s code, a credential inside an exported package, one shared token used by several integrations so that none can be revoked alone.

The control. Keep secrets in configuration or a secret store and send them in headers, never in addresses. Redact them from histories and logs. Give each integration in each environment its own credential so it can be rotated and revoked alone. A package carries configuration, never the credential; the credential is a manual step at each import.

flowchart LR
  INJ["Injection"] --> T["T Tampering"]
  INJ --> I["I Information disclosure"]
  INJ --> E["E Elevation of privilege"]
  BAC["Broken access control"] --> E
  BAC --> I
  XSS["Cross-site scripting"] --> S["S Spoofing"]
  XSS --> I
  CSRF["Request forgery"] --> T
  SSRF["Server-side request forgery"] --> I
  SSRF --> E
  SEC["Secrets handling"] --> S
  SEC --> I

What to notice: the classes are causes and STRIDE names the effects. Most classes lead to more than one harm, which is why a review asks the six STRIDE questions even after it has found the mistake. Repudiation and denial of service rarely come from these six mistakes: they come from design choices (who an automation runs as, what limits a feed has), so look for them separately.

Where the platform places its controls, and where yours begin

Section titled “Where the platform places its controls, and where yours begin”

The platform’s design gives you a foundation, taught as design in M5-S1 and M5-S2: a caller is authenticated once, at the edge; every service behind the edge trusts only the identity the edge forwards, and the edge overwrites anything a caller claims about itself; the permission engine decides each request from that identity; protected fields are masked on every read path. The deployment rule that keeps this true belongs to the operator: no path may reach a service except through the edge.

Your solution and your extensions add new doors: an inbound feed, an outbound webhook, a Function with its own credential, a custom control that renders data, an application user with grants. Every one of them is where the six mistakes above can be made again. That is the scope of a threat model: not the platform’s foundation, which you take as designed, but what you add on top of it.

Five things that sound like controls, and are not

Section titled “Five things that sound like controls, and are not”

Reviews go wrong less often because a threat was missed than because a weak measure was accepted as a control. Listen for these five:

  1. “The page hides it.” Hiding a button, a menu or a field changes what a person sees, not what the server accepts. Anyone can send the request by hand. Only a check on the server is a control.
  2. “It is encrypted.” Encryption in transit stops someone reading or changing a genuine message on the way. It says nothing about who sent it, so it does not answer spoofing, and it does not stop a legitimate reader from leaking what they read.
  3. “We log everything.” A log makes an incident visible afterwards, which answers repudiation. It does not prevent the harm, and a log full of personal data or keys is itself a disclosure.
  4. “Nobody knows the address.” An address is not a secret: it appears in configurations, emails, browser histories and the logs of every system in between. A receiving address must check a credential as if everyone knew it.
  5. “Only our own staff can do it.” Most harm in business systems is done with legitimate access: a mistake, a shortcut, a compromised account. Least privilege and attributable history protect you from your own people as much as from strangers.

When a design answers a threat with one of these, write the threat down as still open.

◇ Worked scenario (5 min) — Sara’s supplier self-service proposal

Section titled “◇ Worked scenario (5 min) — Sara’s supplier self-service proposal”

Sara Qasim, the Procurement Lead, proposes a supplier self-service service. Suppliers would open a public form from a link in Larkspur’s emails, update their contacts, paste a link to their current quality certificate, and change their bank account. A Function would download the certificate from the link and attach it to the supplier. Procurement would receive an email with a one-click confirm link that applies the change. Read the proposal again, then stop at each decision point and decide before you read on.

Decision 1: who is asking? The form is public. Anyone who has the link, or guesses it, can submit a change for Kestrel Seals. That is spoofing, and with a bank account it is the classic invoice-redirection fraud: payments are sent to the fraudster’s account. Decision: the bank-account change leaves the self-service form entirely. Contacts and certificates may be updated by a supplier contact who signs in, and a bank-account change is accepted only as a request that Procurement confirms by calling the supplier on the number already on file.

Decision 2: which record? The draft form carries the supplier’s identifier in its address. A supplier who edits the identifier could change Halcyon Valves’ contacts instead of their own: broken access control, leading to tampering. Decision: the record to change comes from the signed-in contact’s own supplier, decided on the server, never from a value the browser sends.

Decision 3: the certificate link. The Function downloads whatever address it is given. A malicious “certificate link” could point at an internal address and make the platform’s side fetch it: server-side request forgery, with information disclosure if the result is attached where the supplier can read it. Decision: suppliers upload the file; nothing fetches an address a supplier typed.

Decision 4: the remark field. Suppliers may add a remark, which is copied into the purchase order sent to Larkspur’s finance system, whose web page shows it. If that page renders the remark as markup, a supplier could plant a script that runs for every finance clerk: cross-site scripting in the receiving system, caused by data you send. Decision: the remark stays a plain text field, and the integration agreement states that the receiver displays it as text.

Decision 5: the one-click confirm link. A link that applies a change when opened can be triggered by a mail scanner, or by anyone the email is forwarded to: request forgery in its simplest form. Decision: the email links to the request in the platform, where the approver signs in and approves it explicitly, with their own identity recorded.

Decision 6: who did it? In the draft, a reaction running as System applies every confirmed change. Months later, when a supplier disputes a change, the history says only that the platform did it: repudiation. Decision: the approval step records the approver, and the change is applied in the same request as the approval, so the record’s history names a person.

Decision 7: the finance system’s key. The draft Function contains the finance system’s API key in its code so it can post the updated supplier. That is a secrets-handling mistake: the key travels with every copy of the code and every exported package. Decision: the Function returns its result and a reaction’s Call API action posts it, with the key in a header set on each environment, listed as a manual step for each deployment (on the 1.10 line a Function has no secret store of its own).

The outcome. The proposal survives, but changed in its riskiest places: no anonymous changes to money; the server decides which record; uploads instead of fetches; plain text across systems; explicit approvals by signed-in people; keys outside the code. Notice that every decision named a STRIDE category and a vulnerability class: the class told you what mistake the draft made, the category told you why it mattered. In M5-S4 you add the two steps this scenario skipped: drawing the design so you find every door, and ranking what you find.

◇ Worked scenario (3 min) — The wall screen in the plant

Section titled “◇ Worked scenario (3 min) — The wall screen in the plant”

Leila Amari, the Operations Director, wants the Operations Command page on a large screen in the pump plant’s workshop, so that everyone on the floor sees open work orders, overdue inspections and the week’s alarms. The plant’s IT contractor suggests signing the screen in with Leila’s own account, “because she can see everything”, and leaving it signed in. Decide at each point.

Decision 1: whose identity? A screen signed in as Leila acts as Leila for anyone who walks up to it with a keyboard: spoofing of a director, and elevation of privilege for whoever uses it, because Leila’s account can approve and change far more than a wall display needs. Decision: the screen gets its own kiosk account, named for what it is, with View on the page and nothing else.

Decision 2: what does the page show? Operations Command gathers counters and charts from all four modules. One chart shows spend per supplier, which is commercially sensitive and not meant for the workshop floor: information disclosure to visitors, drivers and contractors. Decision: a separate workshop page with the operational widgets only, built for this audience; the director’s page stays the director’s.

Decision 3: what if the screen stops? Nobody would notice for days if the page stopped refreshing, and the floor would act on stale numbers. That is an availability concern of a quiet kind. Decision: the page shows its last refresh time in large type, and the kiosk account’s sign-in is checked by the operator’s routine monitoring.

Decision 4: who changes it? If a planner rearranges the workshop page, the floor sees the change at once. Decision: the page is changed only by its builder through the normal change process, and its history shows who changed what (repudiation answered).

The outcome. A one-line request became four decisions, each found by asking the STRIDE questions of one small door. That is the habit to build: every new door gets the six questions.

✳ Discussion (10 min) — What does Larkspur fear most?

Section titled “✳ Discussion (10 min) — What does Larkspur fear most?”

A threat model ranks threats by what they would cost the business, so it needs to know which assets matter most. Before M5-S4, decide what Larkspur’s “crown jewels” are.

The prompt. (1) Name the three assets of the Larkspur suite whose loss, corruption or exposure would hurt Larkspur most, and say which STRIDE category you fear most for each. (2) Name one threat that is unlikely but would be severe, and one that is likely but minor.

With a facilitator: in groups of three (5 minutes), each group agrees its three assets and writes them on the board with the feared category. The facilitator then compares the groups’ lists (5 minutes) and asks where they differ and why; the differences are usually about likelihood, which is exactly what M5-S4’s ranking makes explicit.

On your own: write your answer to both prompts in five or six lines, then compare it with the model answer. Where you differ, decide whether you weighed impact or likelihood differently.

Model answer

Three crown jewels. (a) Suppliers’ bank details: the feared category is tampering, because a changed account number redirects real payments; disclosure is a close second. (b) Work orders and asset condition: denial of service and tampering, because the maintenance plan for customers’ pumps depends on them; a flood of false alarms or a hidden real alarm both hurt. (c) Approved purchase values: tampering and repudiation, because money leaves the company on their basis and disputes need proof of who approved what.

Unlikely but severe: an outsider changes a supplier’s bank account through a public form, if one ever existed. Likely but minor: a planner sees a cost figure on a dashboard that was not meant for them. A good threat model treats both: the first gets a strong control even though it is rare, the second gets a cheap one.

✓ Practice (8 min) — Name the threat, name the control

Section titled “✓ Practice (8 min) — Name the threat, name the control”
PracticeChoose one answer.

A work-order export lets a planner choose a “sort column” from a drop-down. A Function receives the column name and appends it to a database query string. A planner opens the browser’s developer tools and sends query syntax instead of a column name. Which vulnerability class is this, and which control answers it?

  1. Explanation for A

    ✓ Correct

    Correct: text from the request is interpreted as part of a query, which is injection; an allow-list and structured values stop it. See injection.

  2. Explanation for B

    ✗ Incorrect

    Not this one: hiding a control is presentation, and the request can still be sent by hand; the fault is that text becomes query syntax. See injection.

  3. Explanation for C

    ✗ Incorrect

    Not this one: nothing is rendered in another person’s browser here; the text is executed by the database, which is injection. See the vulnerability classes.

  4. Explanation for D

    ✗ Incorrect

    Not this one: the planner sends the request deliberately in their own session, so no other site is forging it; the text itself is the problem. See the vulnerability classes.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose one answer.

After a quality incident, Orvane Castings insists it never received the non-conformance that lowered its rating. Larkspur’s records show the notice was “sent by System” with no trace of which event or person triggered it. Which STRIDE category describes the weakness?

  1. Explanation for A

    ✗ Incorrect

    Not this one: nobody claims the notice was forged; the issue is that Larkspur cannot prove who or what sent it. See STRIDE.

  2. Explanation for B

    ✓ Correct

    Correct: repudiation is the inability to show who did something; an attributable identity and a history that keeps the cause answer it. See STRIDE.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the supplier is meant to see its own rating; the gap is accountability, not confidentiality. See STRIDE.

  4. Explanation for D

    ✗ Incorrect

    Not this one: the rating was changed by the intended process; what is missing is the evidence of what set it off. See STRIDE.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

An Asset Class record has a field “Manufacturer bulletin address”. A nightly Function downloads whatever address is stored there to read the recommended thresholds. Any planner can edit the field. What is the main weakness?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the address is not a secret; the danger is where the server is told to connect. See server-side request forgery.

  2. Explanation for B

    ✗ Incorrect

    Not this one: size is a minor operational point; the larger risk is the server reaching an address a person chose. See server-side request forgery.

  3. Explanation for C

    ✓ Correct

    Correct: a planner, or anyone with their access, can point the Function at an internal address; an allow-list of destinations answers it. See server-side request forgery.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

A reviewer proposes three controls for an outbound call to Larkspur’s finance system. Which one is a secrets-handling control rather than an access-control one?

  1. Explanation for A

    ✗ Incorrect

    Not this one: narrowing a grant limits what a credential can do, which is least privilege, an access-control measure. See broken access control.

  2. Explanation for B

    ✗ Incorrect

    Not this one: that is a business validation rule; it does not touch how the key is kept. See the vulnerability classes.

  3. Explanation for C

    ✓ Correct

    Correct: a key in an address is stored with the run history and in the receiver’s logs; a header from configuration keeps it out of both. See secrets handling.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

A custom web control shows each meter reading’s note by inserting it into the page as markup, so that technicians can use bold text. A technician types a note containing a script. What happens, and what is the control?

  1. Explanation for A

    ✓ Correct

    Correct: text rendered as active content runs in the reader’s session, which is cross-site scripting; encoding or sanitising output answers it. See cross-site scripting.

  2. Explanation for B

    ✗ Incorrect

    Not this one: markup inserted into a page runs in the browser that displays it, not on the server that stores it. See cross-site scripting.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the note is stored and shown to every planner who opens the reading, so the script reaches them. See cross-site scripting.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose every answer that applies.

A proposed Function receives a request from any signed-in user, then updates supplier records with its own application user, which holds Edit on Supplier Management. Which statements are true? Select all that apply.

  1. Explanation for A

    ✓ Correct

    Correct: the Function’s credential is more powerful than its callers, so it lends them access; that is broken access control. See broken access control.

  2. Explanation for B

    ✓ Correct

    Correct: a caller gains the Function’s wider access through it, which is elevation of privilege. See STRIDE.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the Function can still be called directly; hiding a button is presentation, never a control. See broken access control.

  4. Explanation for D

    ✓ Correct

    Correct: acting with, or checking, the caller’s own access removes the lent privilege. See broken access control.

Check your answer

The correct answers are A, B and D. Open the explanation under each option to see why.

You can now look at any design and ask six STRIDE questions about each part of it, and you can recognise the six common mistakes behind most web-security harm: injection, broken access control, cross-site scripting, request forgery, server-side request forgery and poor secrets handling, each with its control. You also have the design rule the rest of the course applies: never build an expression, a query or a script from user-entered text.

Next. In M5-S4 you turn this vocabulary into a method: draw the Larkspur suite and its planned Condition Monitoring capability as a data-flow diagram, mark the trust boundaries, apply STRIDE to every element, rank what you find, and plan and verify the controls. In M6-S5 the same vocabulary meets a new kind of system: an assistant built on a language model.