Defensive Programming
Noun · Security & Infosec
Definitions
A coding approach that assumes inputs, state, and dependencies may be invalid or hostile and therefore validates, bounds, and handles errors carefully. In security, defensive programming reduces the chance that unexpected conditions turn into exploitable flaws.
In plain English: Writing code to stay safe even when inputs or conditions are bad.
Example: "The parser held up under fuzzing because the team used defensive programming instead of assuming well-formed input."