Skip to content

Whitepaper

CNAPP & Policy-as-Code Complementary, yet distinctly unique

CNAPPs such as Wiz give security teams deep visibility into cloud risk and runtime threats. But most misconfigurations originate before runtime. This whitepaper shows how Nirmata and Kyverno stop them at the source, so your CNAPP surfaces the findings that matter.

9 pages · From the creators of Kyverno

CNAPP answers
“Where are we exposed right now?”
Nirmata answers
“How do we prevent issues and enforce everywhere?”

Where each layer acts

Kyverno prevents and enforces while CNAPP detects

Every Kubernetes resource is written, built and tested, admitted to a cluster, and then runs. Kyverno acts on the left, where a bad configuration can still be stopped or corrected. A CNAPP acts on the right, where it sees what is running and how exposed it is.

Nirmata + KyvernoPrevent · Mutate · Enforce

CNAPPDiscover · Prioritize · Detect

  1. Code

    IaC, Helm, YAML in Git

  2. CI/CD

    Pipeline checks before deploy

  3. Admission

    Block, mutate, generate defaults

  4. Runtime

    Threats, vulns, exposure

  5. Cloud

    Posture, attack paths

Kyverno background scans + audit · stop drift on running resources

Where most misconfigurations originate: before runtimeWhere CNAPP sees them

Feedback loop: a CNAPP finding becomes a Kyverno policy, so the same class of finding is never created again.

Without the loop, every CNAPP finding becomes a ticket, and every ticket becomes a manual fix that the next deployment can reintroduce. With the loop, security identifies a risk once, the platform team codifies it once, and the guardrail applies in every pipeline, cluster and namespace from then on.

The challenge

CNAPP alone is not enough for platform teams

Platform teams give hundreds of developers a self-service platform that is safe by default, without becoming a ticket queue. A list of findings, however well prioritized, does not do that on its own.

Where CNAPPs fall short for platform engineering
LimitationWhy it matters to the platform team
Built for detection and prioritizationCannot enforce across clusters and pipelines with safe defaults, mutation and generation, or consistent exception workflows.
Enforcement scoped to securityCannot encode platform standards, automate safe defaults, or manage exceptions the way a policy system does.
Policies cover security onlyDoes not address the operational, cost and compliance standards across the full developer platform SDLC.
Not developer-facingDevelopers still rely on tickets and manual remediation instead of getting feedback in the pipeline.
Weak drift preventionIdentifies drift but does not stop it from recurring with the next deployment.

The result: CNAPP insights become alerts and tickets that must be translated into platform changes by hand, which increases MTTR and operational toil.

In practice

From finding to guardrail

A CNAPP flags workloads across many clusters running privileged containers. Without a policy layer, each becomes a ticket for the owning team, and the finding returns the next time someone copies an old manifest. With Nirmata, it becomes a single guardrail.

  1. 01 · CNAPP

    Detect

    Security sees privileged pods, ranked by exposure and attack path.

  2. 02 · Platform

    Codify

    The platform team adopts a Kyverno ValidatingPolicy, AI-assisted or from the policy library.

  3. 03 · Nirmata

    Enforce

    Audit first, then enforce in CI and at admission. Exceptions are scoped and logged.

  4. 04 · Both

    Verify

    Background scans clear existing violations. The CNAPP finding class trends to zero.

disallow-privileged-containersyaml
apiVersion: policies.kyverno.io/v1
kind: ValidatingPolicy
metadata:
  name: disallow-privileged-containers
spec:
  validationActions: [Deny]          # start with [Audit], then switch
  evaluation:
    background:
      enabled: true                  # also audits resources already running
  matchConstraints:
    resourceRules:
    - apiGroups: [""]
      apiVersions: [v1]
      operations: [CREATE, UPDATE]
      resources: [pods]
  variables:
  - name: allContainers
    expression: >-
      object.spec.containers +
      object.spec.?initContainers.orValue([]) +
      object.spec.?ephemeralContainers.orValue([])
  validations:
  - expression: >-
      variables.allContainers.all(c,
        c.?securityContext.?privileged.orValue(false) == false)
    message: >-
      Privileged mode is not allowed. Remove securityContext.privileged
      or request an exception from the platform team.

A Kyverno ValidatingPolicy in CEL, enforcing the Pod Security Standards (Baseline) control on privileged containers. The developer sees the message in the pipeline or at kubectl apply, not in a ticket a week later.

Operating model

Who does what

Each team keeps doing the job it is best placed to do. Security does not have to become a platform team, and the platform team does not have to become a security operations center.

  • Security

    CISO organization

    • Runs the CNAPP and owns risk priorities
    • Identifies which finding classes recur most
    • Approves high-risk exceptions
  • Platform

    Platform engineering / DevSecOps

    • Codifies standards as Kyverno policy
    • Rolls out via GitOps, audit before enforce
    • Owns safe defaults and exception workflows
  • Developers

    Application teams

    • Get inline feedback in CI and at admission
    • Inherit safe defaults automatically
    • Request scoped exceptions, not tickets

What changes

Before: CNAPP aloneAfter: CNAPP + Nirmata
One ticket per workload, routed by handOne policy, applied to every cluster through GitOps
The finding reappears on the next deployThe violation is blocked before it reaches the cluster
Developers learn about problems days laterDevelopers see a clear policy message in the pipeline
Exceptions live in email and spreadsheetsExceptions are scoped, time-bound and auditable
CNAPP queues are full of recurring hygiene issuesCNAPP queues surface the findings that need investigation

Better together

Different layers of the security stack

ConcernCNAPPWiz, Prisma Cloud, Sysdig, etc.Nirmata + Kyverno
Core jobDiscovers cloud riskPrevents risky configurations from being created, with guardrails and safe defaults
AnalysisAnalyzes attack pathsEnforces platform guardrails
At deploy timeDetects runtime exposure after deployBlocks violations at admission; mutates and generates safe defaults
OwnerSecurity teamPlatform team
ModeDetection and investigationPrevention and enforcement

Unique to the policy layer: GitOps-based policy deployment · open reporting that integrates with platform tools · background scanning · low-latency admission control · mutation and generation for automation.

Nirmata amplifies CNAPP

Nirmata doesn’t compete with CNAPP. It amplifies it.

Because misconfigurations are stopped before production, the CNAPP reports fewer findings tied to drift and policy violations. Security teams see fewer alerts and tickets, platform teams do less manual remediation, and tools like Wiz surface the higher-signal findings that truly warrant investigation.

Getting started

Four steps to close the loop

  1. 01

    Pick the recurring findings.

    Pull the top configuration-related finding classes from your CNAPP: privileged containers, missing resource limits, images from untrusted registries, host path mounts.

  2. 02

    Map each one to a policy.

    Most have a ready-made Kyverno policy in the open-source library or in Nirmata’s curated policy sets; the rest can be drafted with AI assistance.

  3. 03

    Roll out in audit mode.

    Deploy through GitOps, review policy reports with application teams, and agree on exceptions before anything is blocked.

  4. 04

    Enforce and measure.

    Switch to enforce in CI and at admission, then track the matching CNAPP finding classes over time. They should trend toward zero.

Keep going

This is not security vs. platform engineering.

It’s security and platform engineering, working together. See how Nirmata turns your top CNAPP findings into guardrails.