Threat model and trust boundaries
Input validation alone does not prevent injection in every output context, and a single generic escaping function may be incorrect for multiple syntaxes.
- Identify actors, assets and trust boundaries
- Choose controls that address the stated threat
- Test failure behavior and recovery paths