Shelves / Security
Software Engineering · Volume 10
Security
Part X of the Software Engineering roadmap, written out as a textbook that starts from zero. The opening chapter assumes you have built web apps but never defended one, and shows three real flaws in one small app with the attack and the fix side by side. From there: security principles you can watch in action, cryptography you can use correctly, web, identity and API defences, container and Kubernetes hardening, the software supply chain and threat modelling. Every chapter opens with a plain-language Start here section and a six-level How deep to go ladder, and ends with a lab of real, measured experiments (Linux capabilities, bcrypt and Argon2id costs, AES-GCM nonce reuse, TLS verification, a CSP enforced in headless Chromium, JWT validation, nginx rate limits, Pod Security admission and NetworkPolicies on k3s, SBOMs, hash pinning and cosign signatures, threat models as code) and a revision sheet with a quiz. A final chapter of eight projects secures one system layer by layer.
Two ways to read this book
Every chapter has the same shape: Start here (first principles, plain language, small verified examples) → How deep to go (what each mastery level needs) → full-depth sections → Lab (experiments with real measured output) → Revision sheet (key ideas, numbers to remember, pitfalls, glossary, quiz).
How to use this book
- Read one topic at a time. Each topic heading has a Done tick. Tick it only when you can explain the idea aloud without looking, which is roughly mastery level L2–L3 below.
- Run the code. Every comparison block has tabs for each language; type the example out in at least two of them.
- Take the chapter quiz at the end. A score of 80% or more counts as passed. Wrong answers show the explanation, so re-read that topic and untick it if needed.
- Revisit after a delay. The roadmap's loop applies: recall, explain, implement without notes, break it, measure it.
Mastery levels
Languages used throughout
Status as of October 2026: OWASP Top 10:2025 is current; OAuth 2.1 is still an IETF draft (its practices are already in RFC 9700, the OAuth security best current practice); NIST SP 800-63B-4 (July 2025) is the current password guidance; post-quantum standards FIPS 203–205 are published and hybrid key exchange is on by default in major browsers. Code marked ✗ is deliberately vulnerable, for learning; code marked ✓ is the fix.
Contents
- SC·00Start Here: Thinking Like a DefenderFor readers who have built web apps but never attacked or defended one: why security is a property you design in, three real vulnerabilities in one…6 min
- SC·106Security FoundationsThe concepts every other security topic builds on: confidentiality, integrity and availability (and their extensions: authenticity, non-repudiation…15 min
- SC·107Cryptography FoundationsApplied cryptography for engineers: why you must never invent your own, secure randomness, hash functions and their properties, HMAC, password…32 min
- SC·108Web Application SecurityThe vulnerabilities that dominate real breaches, each explained from the root cause: the OWASP Top 10:2025 as a baseline, injection (SQL, NoSQL…29 min
- SC·109Identity and AccessWho is calling and what they may do: identity, authentication factors and passkeys, sessions and cookies, OAuth 2 and its flows (authorisation code…24 min
- SC·110API SecuritySecuring APIs end to end: the OWASP API Security Top 10, authentication options (API keys, OAuth tokens, mTLS, request signing such as AWS SigV4 and…21 min
- SC·111Container, Kubernetes and Cloud SecuritySecuring the platform your code runs on: the 4C model, minimal and hardened images, image scanning and vulnerability management, signing and…18 min
- SC·112Software Supply Chain SecurityDefending everything between a developer's keyboard and production: the anatomy of supply-chain attacks (SolarWinds, Codecov, xz-utils, event-stream…18 min
- SC·113Threat ModellingDesigning security in rather than bolting it on: the four questions of threat modelling, assets, actors and attacker goals, data flow diagrams with…18 min
- SC·114Security Engineering ProjectsEight build-it-yourself projects that secure the tiffin centre end to end: a least-privilege baseline, cryptography done right, a web app hardened…8 min