Skip to main content
Policies allow you to enforce compliance, security, and operational standards across your infrastructure deployments. Policies are evaluated during builds and deploys, blocking or warning when violations are detected.

What are Policies?

Policies are rules written in OPA Rego or Kyverno that validate your infrastructure before deployment. Each policy can either:
  • Deny - Block the build or deployment when a violation is detected
  • Warn - Log a warning but allow the build or deployment to continue
Policies are evaluated at different phases depending on the component type:
  • Build-time: Policies run during the component build process
  • Deploy-time: Policies run after the plan is generated, before applying changes
  • Sandbox runs: Policies run during sandbox infrastructure provisioning

Policy Types

Nuon supports policies for different component types, each with its own input format:

Policy Engines

OPA (Open Policy Agent)

OPA policies are written in Rego, a declarative query language. Policies must be in the nuon package and use deny or warn rules. The input structure varies by policy type: Example: Terraform policy
Example: Kubernetes/Helm policy
Example: Container image policy

Kyverno

Kyverno policies use YAML syntax and are designed for Kubernetes resources. Kyverno is only supported for kubernetes_cluster policy types:

How do you configure Policies?

Policies are part of your app configuration. To create or update policies, add them to your app config and sync:
Policies list Please go through the Configuring Policies guide for details. Note that unlike components, policies do not need to be built, they are evaluated directly during build and deploy workflows.

Policy Reports

Build-Time Evaluation

Build-time policies are evaluated during the component build process:
  • container_image: Policies evaluate image metadata (SBOM, signatures, attestations) fetched from the registry
If a deny rule matches during build-time evaluation, the build fails with status policy_failed.

Deploy-Time Evaluation

Deploy-time policies are evaluated after the plan is generated, before applying changes:
  • terraform_module: Policies evaluate the Terraform JSON plan
  • helm_chart: Policies evaluate the Kubernetes AdmissionReview objects
  • kubernetes_manifest: Policies evaluate the Kubernetes AdmissionReview objects
If a deny rule matches during deploy-time evaluation, the workflow step fails and changes are not applied.

Sandbox Evaluation

Sandbox policies (type = "sandbox") are evaluated during sandbox infrastructure runs. They receive the Terraform JSON plan for the sandbox infrastructure.

Viewing Policy Results

Dashboard

Policy violations are displayed in the workflow step details. The Policy Report card shows:
  • Passed: All policy checks passed successfully
  • Denies: Policy violations that blocked the workflow (red)
  • Warnings: Policy warnings that were logged but didn’t block (orange)
Each violation includes the policy name and the specific message from your deny or warn rule. Workflow policy violations You can also view a list of all policy reports for an install, or filter by their status, type etc. Policy reports list

CLI

Build failures due to policy violations show the policy_failed status:
Workflow steps display policy violation counts in the output:
Get detailed violation messages for a specific step:

Policy Examples

We maintain a collection of example policies organized by component type to help you get started.
The example repository includes:
  • terraform/ - Policies for Terraform modules (encryption, tagging, IAM security, cost controls)
  • kubernetes/ - Policies for Helm charts and Kubernetes manifests (pod security, resource limits, networking)