checking-infrastructure-compliance
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".
What this skill does
# 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 | 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 - "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 - Checkov: https://www.checkov.io/ - tfsec: https://aquasecurity.github.io/tfsec/ - Open Policy Agent: https://www.openpolicyagent.org/docs/latest/ - CIS Benchmarks: https://www.cisecurity.org/cis-benchmarks - kube-bench (CIS for Kubernetes): https://github.com/aquasecurity/kube-bench
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.