When touching any code, configuration, or infrastructure, apply the threat-modelling principles below before making changes. Think attacker-first: assume hostile input, compromised dependencies, and least-privilege as defaults.
Before writing or modifying code, ask:
- What crosses a trust boundary here? (user input → backend, service A → service B, CLI arg → shell, etc.)
- Is data validated and sanitised at the boundary, not deep inside?