🚀 Submit a Challenge — SecDim AppSec Village CTF at DEF CON 34 and Win a ROG Xbox Ally

Defensive Programming 3rd Core Principle

1hBeginnerSecure Design

The third defensive programming principle focuses on weakly enforced security controls. We may have the hard task of building security controls, but there is no guarantee that they will always be used as our program grows in features. First, we formalize this common issue in anti-patterns, then we will introduce the principle and two implementation techniques.

Topics

  1. Anti patterns

    Lesson15m

    Unsafe behavior can be made impossible through strong enforcement of security checks. We will discuss weaknesses of conventional coding and hints at introducing a more robust defensive programming pattern.

  2. Principle

    Lesson15m

    We will explore a way to enforce safety checks and reducing the possibility of security violations.

  3. First Implementation Technique

    Lesson15m

    Let's explore an approach to ensure code correctness, making the code more expressive and separating logic from validation, though its implementation varies across different programming languages.

  4. Second Implementation Technique

    Lesson15m

    We will explore another means of enforcing specific business logic and prevent unsafe behavior in the code.