Join our Newsletter — 33% off our NHI Course

HashiCorp Sentinel

HashiCorp Sentinel is a policy-as-code framework for enforcing rules during infrastructure and platform workflows. It evaluates policy against planned changes, state, or metadata so teams can block, warn on, or allow actions based on defined conditions, such as resource attributes, environment, or identity context.

What policy-as-code means in infrastructure workflows

HashiCorp Sentinel turns policy into an executable control layer for infrastructure and platform operations. Instead of relying on manual review alone, teams can define conditions that determine whether a planned change is blocked, warned on, or allowed before it reaches production.

This matters because infrastructure workflows are fast, repeatable and often delegated across many teams. Policy-as-code gives organisations a consistent way to express guardrails around resource attributes, environment-specific rules and contextual constraints without embedding those decisions only in human process.

How Sentinel evaluates changes

Sentinel policy is evaluated against data that already exists in the workflow, such as a plan, state snapshot or metadata from the platform. That makes it useful for enforcing pre-deployment checks, change approvals and environment-specific controls at the moment a decision is being made.

The practical effect is that policy can inspect the shape of the intended change, not just the final deployed state. This is important in infrastructure automation because many risky actions are easiest to prevent before the change is applied, rather than after the system has drifted into an unsafe condition.

Where Sentinel fits in platform governance

Sentinel is typically used where platform teams want codified governance that is repeatable across tenants, projects or business units. It helps translate organisational rules into machine-enforceable policy so that exceptions are explicit and reviewable rather than hidden inside ad hoc approvals.

That governance role is strongest when the organisation already has clear standards for what should be allowed. Sentinel does not define policy intent for you, but it provides the enforcement layer that makes those rules operational inside infrastructure provisioning and change workflows.

Because these policies can incorporate environment or identity context, they can support different treatment for different scopes of change. For example, the same resource pattern may be acceptable in a sandbox but blocked in a production context where stronger controls are expected.

Why policy-as-code changes the failure model

Moving policy into code reduces reliance on memory, ticket review or tribal knowledge, but it also means mistakes in policy logic can propagate quickly. A rule that is too permissive can allow unsafe changes at scale, while a rule that is too strict can block legitimate delivery and create workarounds.

For that reason, Sentinel is best understood as a control plane for decision consistency. Its value comes from making policy visible, testable and versioned alongside infrastructure code, so the organisation can review both the intended change and the rule that governs it.

Risk and Threat Considerations

Policy-as-code becomes a security issue when the guardrails are incomplete, misconfigured or bypassed. In infrastructure workflows, a flawed policy can let risky resources be provisioned, while overly broad exemptions can quietly weaken the very controls the policy was meant to enforce.

Failure mechanism: An attacker, insider or careless automation path may exploit weak policy coverage, exception handling or unsafe defaults to introduce resources that violate baseline security or governance requirements.

Impact: The result can be exposed infrastructure, excessive privilege, unsafe network exposure, environment drift or delayed detection of a change that should never have been approved.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

Framework Control / Reference Relevance
NIST SP 800-53 Rev 5 AC-3 — Access Enforcement Sentinel enforces allow or deny decisions on planned infrastructure changes.
CM-3 — Configuration Change Control Sentinel evaluates planned changes before deployment, which aligns with controlled change approval.
CM-6 — Configuration Settings Sentinel can enforce approved configuration conditions for infrastructure and platform workflows.
Recommendation — Apply AC-3 to enforce policy decisions that block unauthorized infrastructure actions. Use CM-3 to review and authorize infrastructure changes before execution. Use CM-6 to define and enforce secure configuration baselines in policy code.
ISO/IEC 27001:2022 A.8.9 — Configuration management Sentinel codifies rules for infrastructure configuration and change approval.
Recommendation — Implement A.8.9 to control and approve infrastructure configuration changes.
CIS Controls v8 CIS-4 — Secure Configuration of Enterprise Assets and Software Sentinel helps enforce secure configuration rules during infrastructure delivery.
Recommendation — Use CIS-4 to standardize secure configuration checks in infrastructure workflows.

Practitioner Guidance

Why practitioners should care: Sentinel is most effective when policy is treated as part of the release system, not as a separate compliance overlay. The policy logic should mirror the organisation’s real approval boundaries, resource standards and environmental trust assumptions.

Common misunderstanding: Teams sometimes assume that policy-as-code replaces governance. In practice, it only works when the rules are kept current, tested against realistic workflows and owned by the people responsible for the underlying platform standards.

Practitioner takeaway: Use Sentinel to make infrastructure decisions deterministic and reviewable, but keep the policy catalogue small enough that teams can understand why a change was blocked or allowed.