인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
배포 및 운영 · SKILL.md

policy-as-code-generator

policy-as-code-generator

Converts natural language compliance requirements into executable policies (OPA Rego, AWS Config Rules, Sentinel, Terraform). Standardizes governance by making it part of the build process.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: policy-as-code-generator description: Converts natural language compliance requirements into executable policies (OPA Rego, AWS Config Rules, Sentinel, Terraform). Standardizes governance by making it part of the build process. allowed-tools: Bash, Read, Glob, Write, Edit

Policy-as-Code Generator

Converts natural language compliance requirements into executable policy code. Generates OPA Rego, AWS Config Rules, Sentinel policies, or Terraform modules.

Quick Commands

Generate OPA Rego policy:

node plugins/grc-engineer/scripts/generate-policy.js "Ensure no S3 buckets are public and all must have a 'Department' tag" rego

Generate AWS Config Rule:

node plugins/grc-engineer/scripts/generate-policy.js "All EC2 instances must have encryption enabled" aws-config

Generate Sentinel policy:

node plugins/grc-engineer/scripts/generate-policy.js "Terraform plans must not create resources without required tags" sentinel

Supported Output Formats

  • rego - Open Policy Agent (OPA) Rego language
  • sentinel - HashiCorp Sentinel policy language
  • aws-config - AWS Config Rule (Python/Lambda)
  • terraform - Terraform policy module
  • checkov - Checkov YAML policy

Example Inputs

  • "Ensure no S3 buckets are public and all must have a 'Department' tag"
  • "All EC2 instances must have encryption enabled and be in a VPC"
  • "Terraform plans must not create resources without required tags"
  • "Kubernetes pods must not run as root user"
  • "All databases must have automated backups enabled"

Output Structure

Generated policies include:

  • Policy definition with clear logic
  • Test cases/examples
  • Documentation comments
  • Integration instructions for CI/CD

Prerequisites

  • Natural language requirement description
  • Optional: Output format (defaults to rego)
저장한 Skills