Hardening a fresh VPS in an afternoon

Part 2: Headers that do real work

Sanitise on the way in, escape on the way out, and do both as late as possible. That one rule covers most of the bugs we find in reviews.

  • Escape late, at the point of output
  • Start CSP in report-only mode
  • Review dependency updates weekly
  • Require two-factor for deploy access

6 comments on “Hardening a fresh VPS in an afternoon”

  1. Ingrid Holm

    Nice to read something that admits the first attempt did not work. That is how it goes in real projects.

    1. Dev Kapoor

      Good question. It took about three weeks, most of it waiting for review and measuring the results.

  2. Ingrid Holm

    I shared this with my team. The list near the end is going straight into our onboarding doc.

  3. Ben Carter

    I disagree slightly on the tooling choice, but the reasoning is solid and well explained.

Leave a comment

Your email address will not be published. Required fields are marked *