opa-image-security-templates

Enforce Kubernetes image security policies with OPA templates.

3|3|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill opa-image-security-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opa-image-security-templates
Source: https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/enforce/skills/opa-image-security-templates
Command: npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill opa-image-security-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kubectl, cosign, trivy, crane, and includes scripts (resource) components.

What problem does it solve?

Enforces image security policies in Kubernetes using OPA templates to restrict registries, require digest references, and validate image signatures.

Core Features & Use Cases

  • Registry allowlist: block public/untrusted registries and allow only corporate registries.
  • Digest enforcement: require immutable digest-based image references to prevent tag mutation.
  • Signature verification: enforce cryptographic signatures via Cosign and optional Rekor attestations.

Quick Start

Apply the OPA image security templates to your Kubernetes cluster to enforce registry allowlists, digest-based image references, and cryptographic signatures.

Frequently Asked Questions about opa-image-security-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Kubernetes image security policies using OPA?

You can enforce Kubernetes image security policies using OPA by applying templates that restrict registries, require digest references, and validate image signatures. This automates policy-as-code across CI/CD pipelines and runtime admission controls.

How do I block untrusted container registries in Kubernetes?

To block untrusted registries in Kubernetes, apply a registry allowlist policy template. This restricts deployments to only corporate registries and blocks public or untrusted sources from being pulled.

Do I need Cosign to enforce cryptographic image signatures in Kubernetes?

Yes, Cosign is required to enforce cryptographic image signatures. The OPA templates use Cosign to validate signatures and optional Rekor attestations for securing your Kubernetes deployments.

What's the best way to prevent Kubernetes tag mutation for container images?

The best way to prevent tag mutation is enforcing digest-based image references. OPA templates require immutable digest references instead of mutable tags to ensure deployed images remain unchanged.

Does this OPA policy-as-code approach work with Trivy and crane?

Yes, this OPA policy-as-code approach works with Trivy and crane. These dependencies are utilized alongside kubectl and Cosign to perform vulnerability checks, signature verification, and image analysis.

Can I apply these image security templates across both CI/CD pipelines and admission controls?

Yes, you can apply these OPA image security templates across both CI/CD pipelines and runtime admission controls. This ensures consistent enforcement of registry allowlists, digests, and signatures throughout the deployment lifecycle.