NDC Conferences

Threat Modeling Developer Behaviour: The Psychology of Bad Code - Tanya Janca

Published 2026-07-28 · Duration 57:58

Summary

Security vulnerabilities are often predictable patterns of human behavior rather than purely technical flaws. The talk advocates for shifting AppSec focus from merely enforcing secure coding standards to understanding and modifying developer psychology using principles from behavioral economics. Key strategies include setting 'secure defaults,' embedding security activities into every phase of the SDLC, and implementing cultural changes (like community practices) to make secure development the path of least resistance.

Download summary

Key takeaways

  1. The Shift from Intentions to Defaults 26:23

    Since 'secure intentions' require constant effort and willpower, organizations should implement 'secure defaults.' This means structuring tools and processes so that the secure path is the automatic, easiest choice (e.g., using an ORM framework that enforces parameterized queries instead of allowing raw SQL concatenation).

  2. Addressing AI-Generated Code Risks ('Vibe Coding') 31:30

    A major risk is 'vibe coding,' where developers rely on AI to write nearly all the code without thorough manual review. Mitigation requires using Retrieval Augmented Generation (RAG) servers that reference secure internal guidelines and enforcing mandatory human code reviews.

  3. Systemic Process Improvement 20:50

    Instead of blaming individuals, security failures should be viewed as systemic issues. Solutions must involve embedding security activities (like threat modeling) into requirements gathering and design phases, making it a continuous part of the SDLC.

  4. Behavioral Nudges over Mandates 27:10

    Effective change comes from 'nudges'—subtle changes in environment or process that guide behavior without restricting options. Examples include automatically enrolling employees in retirement plans (opt-out) or adding documentation debt to sprint reviews.

Technical details

  • Cognitive Biases & Shortcuts 1025s

    Common insecure behaviors are linked to biases such as: **Automation Bias** (over-trusting AI output), **Present Bias/Hyperbolic Discounting** (prioritizing immediate deadlines over future security risks), **Authority Bias** (assuming code from popular forums like Stack Overflow is safe), and **Tragedy of the Commons** (neglecting shared resources like documentation or refactoring).

  • Secure Development Lifecycle (SDLC) Integration 1350s

    Security activities must be integrated into every phase: **Requirements Gathering** (defining security requirements), **Design** (conducting threat modeling/whiteboarding), **Coding** (using IDE tooling to flag risky functions), and **Testing** (making unit tests a gating requirement in CI).

  • Tooling & Automation Checks 1450s

    Recommended technical controls include: **Pre-commit hooks** that scan for secrets/hashes; **Static Analysis Tools** and **Linters** to flag missing error handling or poor quality code; and **CI/CD checks** that can block merges if unit tests fail.

  • Secure Coding Practices 1680s

    Developers should prioritize using Object Relational Mapping (ORM) frameworks to enforce parameterized queries, avoiding manual string concatenation of user input into database queries.

Mentioned resources

  • OAS Top 10 (Security Guideline/Standard)
  • securemyvibe.ca (Online Resource (AI Prompts))

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.