practice

Preventive Guardrail

also called Policy as Prevention, Deny-by-Default Control

A control that makes a non-compliant action impossible, rather than detecting it afterwards and generating a ticket.

governancepolicy-as-codecompliancelanding-zonespaved-roads

Controls come in two forms. Detective controls observe what happened and report it: a scan finds a publicly-readable bucket, a report lists unencrypted volumes. Preventive controls make the action fail: the API call to create a public bucket is denied.

The difference matters because detective controls generate findings, and findings require humans to remediate them. Remediation capacity is fixed; finding generation scales with the estate. Beyond a certain size the backlog grows faster than it is cleared, and the organisation's compliance position is defended by exception rather than by design.

Why it matters

Preventive controls scale with automation; detective controls scale with headcount. In an estate of thousands of resources changing daily, only the first is viable as a primary mechanism — detective controls remain necessary as a safety net, but they cannot be the front line.

Implementation patterns

  • Deny-by-default on the highest-consequence actions: public storage exposure, unencrypted data at rest, regions outside the approved list, resource types not sanctioned, security groups open to the world.
  • Policy as code, versioned, tested and deployed like software — so policy changes are reviewable and reversible rather than console clicks.
  • Enforced at the earliest possible point. Best in the CI pipeline where feedback is fast and the engineer has context; also at the cloud control plane so it cannot be bypassed by a console action.
  • An explicit, time-limited exception path. Controls with no exception process are routed around; controls with a documented, expiring, logged exception are respected.
  • Guardrails paired with a paved road. A control that blocks a need without providing a sanctioned alternative simply relocates the work outside the platform.
  • Tagging enforced at creation, since retroactive attribution never fully happens and without it cost ownership is impossible.

Industry example

A large enterprise beginning a cloud programme across dozens of business units with differing regulatory obligations must settle guardrails before the first workload, because they belong to the set of decisions that are effectively irreversible once workloads exist — alongside account topology, identity, network address space and data residency boundaries.

The failure mode specific to this setting is instructive: the central team builds a control framework so restrictive that business units cannot ship, so those units obtain their own accounts outside the framework. The organisation ends up with a beautifully governed empty landing zone and a shadow estate with no controls at all.

The counter is not more controls; it is making the compliant path faster. A team that can self-serve a compliant environment in an hour will not go around the framework. A team facing a six-week intake process will, and will be right to.

Failure scenarios

  • Guardrails without a paved road, producing shadow infrastructure.
  • Prevention applied to low-consequence actions, generating friction that erodes trust in the whole framework.
  • Policies with no owner, which accumulate until nobody can explain why a deployment is blocked.
  • Exception processes with no expiry, so temporary exceptions become the permanent architecture.
  • Enforcement only in CI, bypassed by anyone with console access — or only at the control plane, giving feedback hours after the engineer moved on.

Trade-offs

Preventive controls trade flexibility for consistency, and they will occasionally block something legitimate. That cost is real and shows up as engineer frustration, which is why the exception path and the paved road are not optional extras but part of the control's design.

Detective controls preserve flexibility and defer the cost to remediation capacity you probably do not have. The workable position is preventive for the small set of actions whose consequences are severe and irreversible, detective for everything else, and a paved road so that compliance is the path of least resistance rather than an obstacle.

Interview question

"Your security scans produce 400 new findings a week and your team closes 50. What do you change — and how do you avoid the version of the fix where teams stop using your platform entirely?"