Building a Security Culture: Threat Modeling in Practice
On this page
Why tools alone don't make teams secure
Scanners, WAFs and policies help, but most vulnerabilities in this course come from decisions developers make every day: how a link is generated, which ID is trusted, what gets logged. A team that thinks about abuse cases while designing produces fewer of them. That habit is the culture.
The STRIDE threat model explained
STRIDE is Microsoft's checklist of threat types, one per letter, each the opposite of a security property:
| Threat | Violates | Question to ask |
|---|---|---|
| Spoofing | Authentication | Can someone pretend to be another user or system? |
| Tampering | Integrity | Can data be changed in transit or at rest? |
| Repudiation | Non-repudiation | Can someone deny doing something, and could we prove otherwise? |
| Information disclosure | Confidentiality | Can data reach someone who shouldn't see it? |
| Denial of service | Availability | Can someone exhaust or break the feature? |
| Elevation of privilege | Authorization | Can someone gain rights they shouldn't have? |
STRIDE example: shareable document links
Feature: a user generates a link that lets others view (or edit) a document.
S Spoofing Can someone create a link for a document they don't own?
-> Require auth AND edit rights on the document, checked server-side (Day 11)
T Tampering Can a view link be turned into an edit link by changing the URL?
-> Permissions stored server-side against an opaque token, not encoded in the URL
R Repudiation Could the owner deny sharing a document that leaked?
-> Audit log of link creation, access and revocation (who, when, from where)
I Disclosure Can links be guessed, or leak through referrers, logs or search engines?
-> 128+ bit random tokens; Referrer-Policy no-referrer; noindex; optional expiry and password
D DoS Can someone create millions of links or hammer a popular one?
-> Per-user limits on link creation; caching and rate limits on access
E Elevation Can a viewer use the link to reach other documents or the owner's account?
-> Token grants access to exactly one document and one permission; no session for the ownerTwelve lines, about half an hour of discussion, and a set of concrete requirements and tests. Notice how each mitigation connects to earlier lessons.
How to build a security culture
- Threat model in design reviews, for features touching authentication, payments, sharing, file uploads, or new external integrations. Keep it lightweight: a diagram and a STRIDE list in the design doc.
- Security champions: a developer on each team with extra training and time, who brings security into everyday reviews and is the first point of contact with the security team. Champions scale a small security team across many product teams.
- Paved roads: make the secure way the easy way. Templates with hardened defaults, a shared auth library, a validation layer, CI with scanning already set up (Days 7, 15, 22).
- Blameless handling of mistakes: people report a leaked key or a risky deploy immediately only if they won't be punished for it (see the CI/CD course on postmortems).
- Learn from real incidents, yours and public ones, in short regular sessions.
- Practice: capture-the-flag exercises, internal bug bounties, and tabletop incident simulations (Day 27).
- Measure what matters: time to fix critical findings, percentage of services on the paved road, repeat vulnerability classes. Not the number of scanner findings closed.
- Leadership support: security work needs time on roadmaps; when it only happens "in spare time", it doesn't happen.
Where this course leaves you
You can now reason about the CIA triad and threat models, store passwords and manage sessions safely, recognize and fix injection, XSS, CSRF, access control and SSRF flaws, use cryptography and keys correctly, verify tokens, protect pipelines and supply chains, harden headers and configuration, and detect and respond to incidents. The common thread: trust nothing that crosses a boundary until you've checked it, and design so that one mistake isn't enough for an attacker.
Check yourself
Spoofing, Tampering, Repudiation, Information disclosure, Denial of service and Elevation of privilege. Each maps to a property you want: authentication, integrity, non-repudiation, confidentiality, availability and authorization.
Anything in the URL can be edited; a server-side record tied to an opaque token can't be changed by the holder.
A developer on a product team who brings security knowledge into everyday design and review, and connects the team with the security group.
When designing a new feature or a significant change, especially one involving authentication, payments or sensitive data, as a short session, not a one-off big document.
Developers who can report mistakes, like a leaked key or a risky deploy, without punishment report them sooner. Every hour saved shortens the window attackers have to exploit the problem.