opa-pod-security-templates

Enforce Kubernetes Pod 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-pod-security-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opa-pod-security-templates
Source: https://github.com/adaptive-enforcement-lab/claude-skills/tree/main/plugins/enforce/skills/opa-pod-security-templates
Command: npx skills add https://github.com/adaptive-enforcement-lab/claude-skills --skill opa-pod-security-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires kubectl, jq, and includes scripts (resource) components.

What problem does it solve?

OPA Pod Security Templates help teams enforce strong security boundaries in Kubernetes by preventing privileged containers, restricting dangerous Linux capabilities, and enforcing secure Pod security contexts across workloads.

Core Features & Use Cases

  • Block privileged containers to eliminate container breakout vectors.
  • Drop dangerous capabilities by default and validate safe capability grants to pods and containers.
  • Enforce pod and container security contexts (runAsNonRoot, readOnlyRootFilesystem, seccomp, and prevent privilege escalation) to harden deployments.
  • Use case: apply overview.yaml, capabilities.yaml, contexts.yaml, and escalation.yaml to implement defense-in-depth across development and production clusters.

Quick Start

Apply overview.yaml to begin enforcing Pod Security policies in your cluster.

Frequently Asked Questions about opa-pod-security-templates

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

FAQPage Schema
How do I prevent privileged containers in Kubernetes using OPA?

Prevent privileged containers by applying OPA pod security templates into Gatekeeper to block container breakout vectors and stop privilege escalation across workloads.

How do I enforce readOnlyRootFilesystem and runAsNonRoot security contexts in Kubernetes?

Enforce readOnlyRootFilesystem and runAsNonRoot security contexts by deploying contexts.yaml templates through OPA Gatekeeper to harden pod deployments across development and production clusters.

Do I need OPA Gatekeeper to enforce Kubernetes pod security policies with these templates?

Yes, you need OPA Gatekeeper or an equivalent policy engine to load and enforce the pod security templates, along with kubectl and jq installed to manage and validate cluster resources.

What is the best way to drop dangerous Linux capabilities in Kubernetes pods?

Drop dangerous Linux capabilities by applying capabilities.yaml templates through OPA Gatekeeper to validate safe capability grants and restrict default capabilities assigned to pods and containers.

Can I apply OPA pod security templates across both development and production clusters?

Yes, OPA pod security templates apply across development and production clusters, utilizing overview.yaml and related policies to implement defense-in-depth security boundaries consistently.

How do I start implementing Kubernetes pod security with OPA templates?

Start implementing Kubernetes pod security by applying overview.yaml to your cluster, which begins enforcing foundational pod security policies and establishes strong security boundaries for workloads.