Checking infrastructure compliance

From jeremylongshore/claude-code-plugins-plus-skills · View interactive version

Checking infrastructure compliance is an AI agent skill from the GitHub repository jeremylongshore/claude-code-plugins-plus-skills. Execute use when you need to work with compliance checking. This skill provides compliance monitoring and validation with comprehensive guidance and automation. Trigger with phrases like "check compliance", "validate policies", or "audit compliance".

How to use this skill

Skill file

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

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

Error Handling

| Error | Cause | Solution |

|-------|-------|---------|

| checkov: no Terraform files found | Scanner run from wrong directory | Specify path explicitly with -d path/to/terraform/ |

| tfsec: failed to parse HCL | Syntax error in Terraform files | Run terraform validate first to fix HCL syntax before compliance scan |

| False positive on compliance check | Rule too broad for the specific use case | Add inline skip comments (#checkov:skip=CKV_AWS_18:Reason) or create a .checkov.yml skip list |

| OPA policy evaluation error | Rego syntax error or missing input data | Test policies with opa eval -d policy.rego -i input.json and validate Rego syntax |

| Scan timeout on large codebase | Too many files or complex module references | Use --compact mode, scan directories individually, or increase timeout limits |

Examples

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.