OpsCanary
kubernetessecurityPractitioner

Runtime Supply Chain Verification with NRI: Securing Your Kubernetes Deployments

5 min read CNCF BlogJul 30, 2026Reviewed for accuracy
Share
PractitionerHands-on experience recommended

Supply chain security is no longer optional. As threats evolve, you need robust mechanisms to verify that the container images you deploy are trustworthy. The Node Resource Interface (NRI) provides a powerful way to hook into container lifecycle events, enabling runtime verification of supply chain attestations. This means you can reject containers that don’t meet your security policies before they even start, mitigating risks from compromised images.

The NRI operates through a plugin API supported by CRI-O and containerd. When a container is about to start, the Supply Chain NRI Plugin subscribes to the CreateContainer event. It synchronously checks the image reference and digest, fetching supply chain attestations from the OCI registry. These attestations are then verified against a per-namespace policy. If any discrepancies arise, the container is rejected. Key configuration parameters include verification mode (defaulting to enforce), fetch_timeout set to 30 seconds, and a policy_dir where your policy files reside. This setup ensures that only compliant images are allowed to run in your environment.

In production, remember that this approach assumes node integrity. An attacker with root access could disable the NRI or alter policy files, which could lead to serious security breaches. The NRI is supported by CRI-O (version 1.28+) and containerd (version 1.7+), so ensure your runtime is up to date to leverage these capabilities effectively. Be cautious about the implications of relying solely on this mechanism without additional layers of security.

Key takeaways

  • Implement the Supply Chain NRI Plugin to enforce image verification at runtime.
  • Configure `fetch_timeout` to manage how long the plugin waits for attestations.
  • Store your policy files in the specified `policy_dir` for organized management.
  • Be aware that node integrity is crucial; an attacker could disable the NRI.
  • Ensure your container runtime is up to date to utilize NRI features effectively.

Why it matters

By validating image attestations at runtime, you significantly reduce the risk of deploying compromised containers, protecting your applications and data from supply chain attacks.

Code examples

Bash
$ nri-supply-chain --config config.toml 
    --verify-image ghcr.io/saschagrunert/nri-supply-chain:0.1.5
JSON
1{
2  "image": "ghcr.io/saschagrunert/nri-supply-chain:0.1.5",
3  "digest": "sha256:1a8b39eeff74b8bb3e20c7f9fa773d4a9935241f7cc4e1217067c8186c2cee3c",
4  "namespace": "default",
5  "allowed": true,
6  "checkRe

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Better StackSponsor

Unified observability — logs, uptime monitoring, and on-call in one place. Used by 50,000+ engineering teams to ship faster and sleep better.

Try Better Stack free →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.