The field guide · rule 02 of 16
Check everything that comes in
Treat anything from outside as possibly wrong, and check it the moment it arrives.
What it means
Anything that comes from outside the system might be wrong, or even hostile: what a user types, what a browser sends, what another service returns, even a settings file. Check it at the door. If the settings are wrong, the system should refuse to start, rather than fail halfway through a customer's request.
What goes wrong without it
A payout address with one wrong character sends money to the wrong place, and there is no way to get it back.
How I build it
- My chain-intelligence service checks every setting when it starts. A bad setting stops it from starting at all.
- A contact form I built checks the email format and length, and removes hidden line breaks that could be used to send spam through it.
- My mining apps check wallet addresses with their built-in check digits, so a typo cannot send coins to the wrong place.
Ask your team
- Do you check what users and other services send before you use it?
- Does the system refuse to start with bad settings?
- Is every amount and address checked before money moves?
How a review checks this
A review lists every place where outside data enters, and checks what happens when that data is wrong.
Request a reviewThe offer: Architecture reviewCheck your system in one minute