Skip to content

Secure development habits

Editor
Engineering leadership

Engineers, QA, and DevOps.

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.

The dangerous path (login, money, other people’s data) has an explicit check in code, and a reviewer can find it without a hunt.

  1. When you design, name who can do what. Put it on the ticket or spec.
  2. Implement checks next to the data change, not only in the UI.
  3. On the PR, call out auth and data handling so the reviewer does not miss it.
  4. Store credentials with Secrets. Never in the diff.