Secure development habits
Who this is for
Section titled “Who this is for”Engineers, QA, and DevOps.
When to use it
Section titled “When to use it”While designing, coding, and reviewing.
- Must: Do not trust input from the browser, app, or a webhook. Validate and authorize on the server (or the trusted backend). See the stack page for where that boundary is.
- Must: AuthZ is checked where the data lives. Hiding a button is not access control.
- Must: Reviewers look for secrets, auth gaps, and injection — not only style. See Code review.
- Should: Default to deny: open lists, admin routes, and verbose errors stay off until you need them.
- Should: Log security-relevant failures (auth, permission) without logging secrets or full personal data.
- Team decides: Threat-model depth for this system. A public app with payments needs more than an internal admin with VPN.
What good looks like
Section titled “What good looks like”The dangerous path (login, money, other people’s data) has an explicit check in code, and a reviewer can find it without a hunt.
What to do
Section titled “What to do”- When you design, name who can do what. Put it on the ticket or spec.
- Implement checks next to the data change, not only in the UI.
- On the PR, call out auth and data handling so the reviewer does not miss it.
- Store credentials with Secrets. Never in the diff.