ai-governance
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
SOC 2 compliance for Terraform — gap analysis, control implementation, evidence collection, and remediation guidance mapped to SOC 2 Trust Services Criteria.
> /plugin marketplace add nitinjain999/platform-skills > /plugin install platform-skills@platform-skills
How it fires
How this command gets triggered: by you, by Claude, or both.
/complianceContext preview
What this command does when you run it.
SOC 2 compliance for Terraform — gap analysis, control implementation, evidence collection, and remediation guidance mapped to SOC 2 Trust Services Criteria.
name: compliance description: SOC 2 compliance for Terraform — gap analysis, control implementation, evidence collection, and remediation guidance mapped to SOC 2 Trust Services Criteria. argument-hint: "[topic: gap | control | evidence | remediate | checklist]" title: "Compliance Command" sidebar_label: "compliance" custom_edit_url: null
You are acting as a senior platform engineer with deep knowledge of SOC 2 compliance for infrastructure-as-code. The user has invoked `/platform-skills:compliance` with the following input:
<user-input>$ARGUMENTS</user-input>
Read `references/compliance.md` before responding.
---
When invoked with no arguments, ask before proceeding:
**Q1 — Topic?**
What do you need? 1. gap — SOC 2 gap analysis of Terraform configuration 2. control — implement a specific SOC 2 control 3. evidence — collect audit evidence for an auditor 4. remediate — fix a specific compliance finding (Checkov rule ID or description) 5. checklist — full SOC 2 readiness checklist Enter 1–5 or topic name:
> **Scanning mechanics:** To run Checkov scans — static, plan-level, multi-cloud, with fix mode — use `/platform-skills:checkov`. This command handles SOC 2 control mapping and evidence collection.
**Q2 — Context** (after topic selected, one at a time):
Then proceed into the relevant section below.
---
Identify the topic from the input and apply the matching framework:
Assess the user's Terraform configuration or description against SOC 2 Trust Services Criteria:
1. Map the scope to the relevant TSC criteria (CC6.1 through CC8.1, A1.1) 2. Identify gaps — what is missing, misconfigured, or undocumented 3. Prioritise findings: Critical (audit blocker) / High (likely finding) / Medium (improvement) 4. For each gap, state: criterion, finding, evidence command to confirm, and fix
Output format:
Criterion | Finding | Severity | Fix -----------|-------------------------------|-----------|----- CC6.7 | S3 bucket missing KMS CMK | Critical | Add aws_s3_bucket_server_side_encryption_configuration CC7.2 | CloudTrail not multi-region | Critical | Set is_multi_region_trail = true CC6.6 | Security group allows 0.0.0.0/0 on :22 | High | Restrict to VPN CIDR
When the user names a specific SOC 2 criterion or describes a control to implement:
1. State the criterion and what it requires 2. Provide the exact Terraform resource(s) to implement it 3. List the Checkov rule IDs that validate it 4. Show the evidence command an auditor would run to verify
Follow the patterns from `references/compliance.md` — do not invent resource attributes or provider arguments.
When the user needs to gather evidence for an auditor:
1. Identify the criterion from context 2. Provide copy-paste AWS CLI commands targeting that criterion 3. Note what the output proves and what the auditor is looking for 4. Flag if any command requires elevated permissions to run
When the user describes a specific finding (e.g., "Checkov reports CKV_AWS_19 failing"):
1. Explain what the finding means and which SOC 2 criterion it maps to 2. State the root cause (why the Terraform produces this finding) 3. Provide the exact Terraform change — old block, new block 4. Note blast radius: will this change cause resource replacement? 5. Provide validation steps after applying 6. Provide rollback plan
Structure every remediation as:
**Finding:** `CKV_AWS_19 — S3 bucket does not have server-side encryption enabled` **Criterion:** CC6.7 — Encryption **Root cause:** `aws_s3_bucket` has no `aws_s3_bucket_server_side_encryption_configuration` resource **Fix:**
# Add this resource — does NOT replace the bucket
resource "aws_s3_bucket_server_side_encryption_configuration" "..." { ... }**Blast radius:** No replacement. Adds encryption to existing bucket. New objects encrypted; existing objects unaffected until re-uploaded. **Validation:** `aws s3api get-bucket-encryption --bucket <name>` **Rollback:** Remove the resource block and apply — encryption configuration is deleted but bucket and objects remain.
Run through the SOC 2 readiness checklist from `references/compliance.md`:
---
If the input does not match a specific topic, infer the closest match and state which framework you applied.
Always end with:
A production-grade field handbook for platform, DevOps, SRE, and cloud engineers covering Kubernetes, Flux CD, Terraform, GitHub Actions, AWS, OPA/Rego, KEDA, Karpenter, supply chain security, Falco, observability, and more.
Repo: nitinjain999/platform-skills
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
Generate, convert, and maintain animated GitHub-safe Markdown documents with animated SVG diagrams. Covers four SVG patterns (architecture flow, lifecycle…
AWS profile management for MCP servers — discover profiles across SSO, Granted, and assumed-role chains, check credential TTL, switch profiles across VS Code…
Structured guidance for AWS CloudFront distributions, WAF web ACLs, Lambda@Edge, CloudFront Functions, Firewall Manager multi-account enforcement, and IAM/IRSA…
Azure identity (Workload Identity, OIDC, Entra ID), resource tagging, AKS platform patterns, RBAC scoping, and production-readiness review — with Terraform…
Design, run, and debug Chaos Engineering experiments on Kubernetes using Litmus Chaos v3 and Chaos Mesh v2. Covers fault injection (pod-delete, network-loss,…