Module 73: Security Introduction
Attack surfaces
🏠The everyday picture
A house's attack surface is every door, window, vent and spare key under the mat. Fewer openings, better locked, means fewer ways in.
📘What it really is
- The attack surface is every place an attacker could interact with your system:
- network: open ports (SSH, HTTP, HTTPS; hopefully nothing else, Module 66);
- application: every page, form, API endpoint, file upload, and parameter;
- people and accounts: every login, admin user, API key, and person with access;
- supply chain: every dependency, container base image, GitHub Action and third-party service;
-
physical and devices: laptops with SSH keys or saved passwords, phones with authenticator apps.
-
Reduce the surface:
- close unused ports and remove unused services;
- delete unused endpoints, test pages and old accounts;
- fewer dependencies; remove unused ones;
-
fewer people with admin access (Module 74).
-
Defence in depth: several layers, so one failure isn't a disaster: firewall + private database network + database roles + app permissions + encryption + backups.
-
Trust boundaries: places where data crosses from less trusted to more trusted (browser to API, API to database, webhook from a third party into your server). Every boundary needs checks: validation, authentication, permissions.
🖱️Try it
Map your CRM's attack surface in your architecture diagram: mark every open port, every public endpoint (list your API routes), every account with access, and every outside service. Draw the trust boundaries. Find three things you can remove or close, and do it.
✅Quick check
What's a trust boundary?
Show the answer
A point where data moves from a less trusted part of the system to a more trusted one, needing checks.
What is defence in depth?
Show the answer
Several independent layers of protection, so one failing doesn't expose everything.
