CH

checking-infrastructure-compliance

Automates compliance monitoring and infrastructure validation using policy-as-code tools like OPA and Checkov.

Install

mkdir -p .claude/skills/checking-infrastructure-compliance && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8494" && unzip -o skill.zip -d .claude/skills/checking-infrastructure-compliance && rm skill.zip

Installs to .claude/skills/checking-infrastructure-compliance

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Execute use when you need to work with compliance checking.
59 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Scan Terraform files for security misconfigurations
  • Validate Kubernetes manifests for network policies
  • Check IAM policies for least-privilege violations
  • Generate compliance reports for SOC 2 or HIPAA
  • Produce remediation patches for infrastructure violations

How it works

It audits infrastructure configurations against compliance frameworks using policy-as-code tools to identify violations and generate remediation plans.

Inputs & outputs

You give it
Terraform, CloudFormation, or Kubernetes manifests
You get back
Compliance report and remediation patches

When to use checking-infrastructure-compliance

  • Scan Terraform files for security misconfigurations
  • Validate Kubernetes manifests for network policies
  • Check IAM policies for least-privilege violations
  • Generate compliance reports for SOC 2 or HIPAA

About this skill

Checking Infrastructure Compliance

Overview

Audit infrastructure configurations against compliance frameworks (CIS Benchmarks, SOC 2, HIPAA, PCI-DSS, GDPR) using policy-as-code tools like Open Policy Agent (OPA), Checkov, and tfsec. Generate compliance reports, identify violations, and produce remediation plans for Terraform, Kubernetes, and cloud provider configurations.

Prerequisites

  • Policy-as-code tool installed: checkov, tfsec, opa, or kube-bench
  • Infrastructure-as-code files (Terraform, CloudFormation, Kubernetes manifests) in the project
  • Cloud provider CLI authenticated with read access to resources
  • Compliance framework requirements documented (CIS, SOC 2, HIPAA, PCI-DSS)
  • jq for parsing JSON policy outputs

Instructions

  1. Identify the applicable compliance framework(s) based on industry and data classification
  2. Scan Terraform files with checkov -d . or tfsec . to detect misconfigurations
  3. Scan Kubernetes manifests for security issues: missing resource limits, privileged containers, missing network policies
  4. Validate IAM policies for least-privilege violations using cloud-native tools (aws iam access-analyzer)
  5. Check encryption at rest and in transit: verify S3 bucket encryption, database TLS, and EBS volume encryption
  6. Audit logging configurations: confirm CloudTrail/Cloud Audit Logs are enabled and sent to immutable storage
  7. Generate a compliance report mapping each finding to the relevant control (e.g., CIS AWS 2.1.1)
  8. Produce remediation Terraform/YAML patches for each violation with severity ranking (Critical, High, Medium, Low)
  9. Set up CI/CD integration so compliance checks block merges on Critical/High violations

Output

  • Compliance scan results in JSON/SARIF format for CI integration
  • Markdown compliance report with control mappings and pass/fail status
  • Remediation code patches (Terraform diffs, Kubernetes manifest updates)
  • OPA/Rego policy files for custom organizational rules
  • CI/CD pipeline step configuration for automated compliance gating

Error Handling

ErrorCauseSolution
checkov: no Terraform files foundScanner run from wrong directorySpecify path explicitly with -d path/to/terraform/
tfsec: failed to parse HCLSyntax error in Terraform filesRun terraform validate first to fix HCL syntax before compliance scan
False positive on compliance checkRule too broad for the specific use caseAdd inline skip comments (#checkov:skip=CKV_AWS_18:Reason) or create a .checkov.yml skip list
OPA policy evaluation errorRego syntax error or missing input dataTest policies with opa eval -d policy.rego -i input.json and validate Rego syntax
Scan timeout on large codebaseToo many files or complex module referencesUse --compact mode, scan directories individually, or increase timeout limits

Examples

  • "Run a CIS Benchmark compliance check against all Terraform files and generate a report with remediation steps for Critical findings."
  • "Create OPA policies that enforce: all S3 buckets must have encryption, all EC2 instances must have IMDSv2, and all security groups must not allow 0.0.0.0/0 ingress."
  • "Scan Kubernetes manifests for PCI-DSS compliance: verify no privileged containers, all pods have resource limits, and network policies exist for every namespace."

Resources

When not to use it

  • Large codebases without compact mode
  • Files with invalid HCL syntax

Prerequisites

Policy-as-code tool (checkov, tfsec, opa, or kube-bench)Infrastructure-as-code filesCloud provider CLIjq

Limitations

  • Scan timeout on large codebase
  • False positive on compliance check

How it compares

It automates the mapping of infrastructure findings to specific industry control frameworks rather than just reporting raw security vulnerabilities.

Compared to similar skills

checking-infrastructure-compliance side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
checking-infrastructure-compliance (this skill)027dReviewIntermediate
secrets-management53moReviewAdvanced
devops-iac-engineer27moReviewAdvanced
deploying-applications08moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

secrets-management

wshobson

Implement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.

585

devops-iac-engineer

davila7

Implements infrastructure as code using Terraform, Kubernetes, and cloud platforms. Designs scalable architectures, CI/CD pipelines, and observability solutions. Provides security-first DevOps practices and site reliability engineering guidance.

223

deploying-applications

ancoleman

Deployment patterns from Kubernetes to serverless and edge functions. Use when deploying applications, setting up CI/CD, or managing infrastructure. Covers Kubernetes (Helm, ArgoCD), serverless (Vercel, Lambda), edge (Cloudflare Workers, Deno), IaC (Pulumi, OpenTofu, SST), and GitOps patterns.

00

aegisops-ai

Anhvu1107

ALWAYS use this when the request matches Aegisops AI: Autonomous DevSecOps & FinOps Guardrails.

00

mlops-engineer

sickn33

Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.

333

aws-advisor

tech-leads-club

Expert AWS Cloud Advisor for architecture design, security review, and implementation guidance. Leverages AWS MCP tools for accurate, documentation-backed answers. Use when user asks about AWS architecture, security, service selection, migrations, troubleshooting, or learning AWS. Triggers on AWS, Lambda, S3, EC2, ECS, EKS, DynamoDB, RDS, CloudFormation, CDK, Terraform, Serverless, SAM, IAM, VPC, API Gateway, or any AWS service.

529

Search skills

Search the agent skills registry