Michael Koppmann
Typed Security: Preventing Vulnerabilities By Design
#1about 3 minutes
Introduction to domain-driven design principles
Domain-driven design (DDD) helps structure code to match the business domain by using concepts like entities, value objects, and aggregates.
#2about 4 minutes
Making illegal states unrepresentable with types
By designing data types so that invalid combinations cannot be expressed, the compiler can prevent bugs and enforce business rules automatically.
#3about 3 minutes
Avoiding null pointer exceptions with optionals
Using the `Optional` type in languages like Java explicitly models the potential absence of a value, forcing developers to handle empty cases.
#4about 2 minutes
Overcoming primitive obsession with custom types
Wrapping primitive types like strings and integers in custom types (e.g., `UserId`) prevents logical errors like mixing up different kinds of IDs.
#5about 9 minutes
Modeling a business workflow with rich types
An email verification process is modeled using smart constructors and sum types, replacing a simple boolean flag to guarantee correctness.
#6about 2 minutes
Applying typed security to OWASP vulnerabilities
Type systems can be used to systematically prevent common security flaws listed in the OWASP Top 10, such as injection and access control issues.
#7about 7 minutes
Using types as authorization tokens
Replacing boolean authorization checks with type-based access tokens ensures that protected functions can only be called after a successful permission check.
#8about 2 minutes
Preventing SQL injection with a query type
Differentiating between a raw string and a dedicated `Query` type at the compiler level prevents accidental string concatenation and forces safe data handling.
#9about 4 minutes
Preventing data leaks with data transfer objects
Data Transfer Objects (DTOs) act as a boundary layer, exposing only necessary and safe data to external clients while protecting sensitive internal models.
#10about 2 minutes
Eliminating XSS with a dedicated HTML type
In frameworks like Elm, treating HTML as a distinct type ensures that all string inputs are automatically sanitized, preventing cross-site scripting attacks.
#11about 2 minutes
Structuring applications with clean architecture
Architectural patterns like Clean or Hexagonal Architecture isolate the pure business logic core from external dependencies, complementing a type-driven approach.
#12about 2 minutes
Key takeaways for building secure applications
The core principles for secure design are to make illegal states unrepresentable, parse instead of just validating, and use the compiler as a security tool.
#13about 17 minutes
Q&A on type systems and legacy code
The speaker answers audience questions about effective languages, limitations, frontend vs backend validation, and applying these concepts to legacy codebases.
Related jobs
Jobs that call for the skills explored in this talk.
aedifion GmbH
Köln, Germany
€30-45K
Intermediate
Network Security
Security Architecture
+1
Technoly GmbH
Berlin, Germany
€50-60K
Intermediate
Network Security
Security Architecture
+2
MARKT-PILOT GmbH
Stuttgart, Germany
Remote
€75-90K
Senior
Java
TypeScript
+1
Matching moments
05:55 MIN
The security risks of AI-generated code and slopsquatting
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
03:45 MIN
Preventing exposed API keys in AI-assisted development
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
11:32 MIN
The industry's focus on frameworks over web fundamentals
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:05 MIN
Building collaborative design tools and the neo-brutalism trend
Slopquatting, API Keys, Fun with Fonts, Recruiters vs AI and more - The Best of LIVE 2025 - Part 2
02:48 MIN
Building trust through honest developer advocacy
Devs vs. Marketers, COBOL and Copilot, Make Live Coding Easy and more - The Best of LIVE 2025 - Part 3
03:48 MIN
Automating formal processes risks losing informal human value
What 2025 Taught Us: A Year-End Special with Hung Lee
11:10 MIN
The only frontend stack that truly matters
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:38 MIN
Balancing the trade-off between efficiency and resilience
What 2025 Taught Us: A Year-End Special with Hung Lee
Featured Partners
Related Videos
Friend or Foe? TypeScript Security Fallacies
Liran Tal
Programming secure C#/.NET Applications: Dos & Don'ts
Sebastian Leuer
Lies we Tell Ourselves As Developers
Stefan Baumgartner
The Art and Craft of Type Development
Michael Hladky & Stefan Baumgartner
Securing Frontend Applications with Trusted Types
Philippe De Ryck
101 Typical Security Pitfalls
Alexander Pirker
What The Hack is Web App Sec?
Jackie
Security in modern Web Applications - OWASP to the rescue!
Jakub Andrzejewski
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Confideck GmbH
Vienna, Austria
Remote
Intermediate
Senior
Node.js
MongoDB
TypeScript

Visonum GmbH
Remote
Junior
Intermediate
React
Redux
TypeScript

Syntax Systems GmbH & Co. KG
Weinheim, Germany
Remote
Python
Ansible
Powershell
Scripting (Bash/Python/Go/Ruby)



Ninedots
Python
CircleCI
Amazon Web Services (AWS)


engelhardt softwareentwicklung GmbH
Ditzingen, Germany
Remote
CSS
GIT
HTML
Java
+10

Talent Smart
Edinburgh, United Kingdom
£175-179K
UML
JIRA
Azure
Data Lake
+1