Secure Software Design Principles
Secure defaults, deny by default, least privilege, complete mediation, separation of duties and explicit boundaries make the safe path the easy path.
Frame the problem
Security starts with a concrete asset, attacker capability and trust crossing.
Why the system fails
Controls are optional calls, dangerous behavior is the default, or one trusted component accumulates unrelated authority.
The important question is not “what is Secure Software Design Principles?” but “which assumption let untrusted data or an over-scoped identity cross design intent → every concrete execution path?” Trace the decision at the boundary, then constrain what can happen after the first control fails.
Design the control in layers
Start with the control closest to the interpretation or privilege boundary: Make enforcement structural and complete Then add a control that reduces blast radius and telemetry that proves the decision was enforced.
The resulting design is not labelled secure. Record the identified controls, the known failure paths, the remaining exposure, and the evidence you would need during an incident.
| Prevent | Detect | Recover |
|---|---|---|
| Make enforcement structural and complete · Default to private, denied and minimally privileged · Separate high-risk duties and reduce the trusted computing base | Invariant-focused tests and review of privileged path changes | Contain the affected identity or component, scope impact from audit evidence, and preserve a regression test. |
Key points
- Asset: Security invariants that must survive feature changes and operational pressure.
- Boundary: Design intent → every concrete execution path
- Primary control: Make enforcement structural and complete
- Detection signal: Invariant-focused tests and review of privileged path changes
- Always ask what limits damage when the primary control fails.
Boundary control exercise
This lesson uses the shared boundary-control exercise.
Follow the attack
Safe conceptual simulation: capability → missing control → crossed boundary → asset impact.
- 1Attacker starts with: Any caller or compromised component that finds an alternate path.
- 2Controls are optional calls, dangerous behavior is the default, or one trusted component accumulates unrelated authority.
- 3The weak or missing boundary control is crossed: Design intent → every concrete execution path
- 4Impact: A small defect bypasses the entire security model.
- A small defect bypasses the entire security model.
Defend, detect, recover
One prevention is a single point of security failure. Layer it and make failure observable.
- • Make enforcement structural and complete
- • Default to private, denied and minimally privileged
- • Separate high-risk duties and reduce the trusted computing base
- • Invariant-focused tests and review of privileged path changes
- • Contain the affected identity or component.
- • Scope access from audit evidence.
- • Fix the boundary and add a regression test.
- • Misconfiguration and new access paths can bypass the intended control.
- • A privileged insider or compromised control plane may still reach the asset.