security-benchmarks
This skill should be used when the user asks about "cis benchmark", "cis kubernetes", "cis docker", "cis aws", "cis azure", "cis gcp", "soc2 rego", "soc2 policy", "hipaa compliance", "pci-dss", "nist 800-53", "iso 27001", "compliance rego", "security controls", "benchmark alignment", or mentions mapping OPA policies to compliance frameworks. Provides CIS benchmark control mappings and compliance framework references for OPA/Rego policies.
What this skill does
# Security Benchmarks Reference for mapping OPA/Rego policies to CIS benchmarks, SOC 2, HIPAA, PCI-DSS, NIST 800-53, and other compliance frameworks. Use when writing benchmark-aligned policies or creating policy specs. **CRITICAL: Benchmark ID Accuracy** - **ONLY cite control IDs that appear in this skill's tables or in `references/compliance-matrix.md`.** Do not generate plausible-looking IDs from general knowledge. - If a user requests controls for a platform/framework not covered in these references, explicitly state: "The following IDs are from general knowledge and have not been verified against the authoritative benchmark document." - **Never fabricate CIS IDs.** This skill covers a subset of each benchmark. If controls beyond this subset are needed, recommend consulting the full CIS benchmark document. - **HIPAA and ISO 27001 coverage is partial.** Do not claim comprehensive coverage. State limitations transparently. ## Benchmark Ecosystem Overview | Framework | Type | Rego Coverage | Primary Tools | |-----------|------|---------------|---------------| | CIS Benchmarks | Technical controls | Strong | Terrascan, Trivy, Kubescape, Regula | | SOC 2 Type II | Trust principles | Partial | Kubescape, Terrascan | | HIPAA | Healthcare data | Partial | Cloud IaC rules, custom Rego | | PCI-DSS 4.0 | Payment card data | Partial | Terrascan | | NIST 800-53 | Federal security | Growing | OSCAL C2P, Terrascan | | ISO 27001 | InfoSec management | Minimal | Custom Rego required | --- ## CIS Kubernetes Benchmark ### Key Controls for OPA/Gatekeeper | CIS ID | Title | Rego Enforcement | |--------|-------|-----------------| | 5.2.1 | Minimize admission of privileged containers | Deny `securityContext.privileged: true` | | 5.2.2 | Minimize admission of containers wishing to share host PID | Deny `hostPID: true` | | 5.2.3 | Minimize admission of containers wishing to share host IPC | Deny `hostIPC: true` | | 5.2.4 | Minimize admission of containers wishing to share host network | Deny `hostNetwork: true` | | 5.2.5 | Minimize admission of containers with allowPrivilegeEscalation | Deny unless `allowPrivilegeEscalation: false` | | 5.2.6 | Minimize admission of root containers | Require `runAsNonRoot: true` | | 5.2.7 | Minimize admission with NET_RAW capability | Require `drop: ["ALL"]` or `drop: ["NET_RAW"]` | | 5.2.8 | Minimize admission with added capabilities | Deny capabilities beyond allowed list | | 5.2.9 | Minimize admission of containers with assigned SELinux | Restrict SELinux options | | 5.4.1 | Prefer using secrets as files over env vars | Warn on `envFrom.secretRef` | | 5.7.1 | Create administrative boundaries between resources | Require namespace labels | | 5.7.2 | Ensure that the seccomp profile is set | Require seccomp annotation/field | | 5.7.3 | Apply security context to pods and containers | Require securityContext on all pods | ### Pod Security Standards Mapping | PSS Level | CIS Controls | Rego Focus | |-----------|-------------|------------| | **Privileged** | None | No restrictions | | **Baseline** | 5.2.1-5.2.4, 5.2.8 | Deny dangerous capabilities | | **Restricted** | 5.2.1-5.2.9, 5.7.2-5.7.3 | Full security context enforcement | --- ## CIS Docker Benchmark (Section 4: Container Images) | CIS ID | Title | Rego Check | |--------|-------|-----------| | 4.1 | Ensure a user for the container has been created | Require `USER` instruction | | 4.2 | Ensure containers use trusted base images | Allowlist registries | | 4.3 | Ensure unnecessary packages are not installed | Warn on `apt-get install` without `--no-install-recommends` | | 4.6 | Ensure HEALTHCHECK instructions have been added | Require `HEALTHCHECK` | | 4.7 | Ensure update instructions are not used alone | Deny `apt-get update` without `apt-get install` in same RUN | | 4.9 | Ensure COPY is used instead of ADD | Deny `ADD` except for archives | | 4.10 | Ensure secrets are not stored in Dockerfiles | Deny ENV with secret-like patterns | --- ## CIS AWS Foundations Benchmark ### Key Controls for Terraform Policies | CIS ID | Title | Resource Type | Rego Check | |--------|-------|--------------|-----------| | 1.4 | Ensure no root account access key | `aws_iam_access_key` | Deny root access keys | | 1.16 | Ensure IAM policies not attached to users | `aws_iam_user_policy` | Deny direct user policies | | 2.1.1 | Ensure S3 bucket encryption | `aws_s3_bucket` | Require SSE configuration | | 2.1.2 | Ensure S3 bucket policy denies HTTP | `aws_s3_bucket_policy` | Require `aws:SecureTransport` | | 2.1.5 | Ensure S3 bucket access logging | `aws_s3_bucket_logging` | Require logging config | | 2.2.1 | Ensure EBS encryption by default | `aws_ebs_volume` | Require `encrypted: true` | | 2.3.1 | Ensure RDS encryption | `aws_rds_instance` | Require `storage_encrypted: true` | | 3.1 | Ensure CloudTrail enabled all regions | `aws_cloudtrail` | Require `is_multi_region_trail` | | 4.1 | Ensure no SG allows ingress 0.0.0.0/0 to port 22 | `aws_security_group` | Deny `0.0.0.0/0` on port 22 | | 4.2 | Ensure no SG allows ingress 0.0.0.0/0 to port 3389 | `aws_security_group` | Deny `0.0.0.0/0` on port 3389 | | 5.1 | Ensure VPC flow logging | `aws_flow_log` | Require for all VPCs | --- ## CIS Azure Foundations Benchmark | CIS ID | Title | Rego Check | |--------|-------|-----------| | 3.1 | Ensure secure transfer required for storage | Require `enable_https_traffic_only` | | 3.9 | Ensure storage account access keys rotated | Warn on long-lived keys | | 4.1.1 | Ensure SQL auditing is enabled | Require audit policy | | 4.3.1 | Ensure TLS 1.2+ for SQL | Require `minimum_tls_version: "1.2"` | | 6.1 | Ensure Network Watcher is enabled | Require per region | | 7.1 | Ensure VM disks are encrypted | Require disk encryption | | 8.1 | Ensure Key Vault is recoverable | Require `purge_protection_enabled` | --- ## CIS GCP Foundations Benchmark | CIS ID | Title | Rego Check | |--------|-------|-----------| | 1.1 | Ensure MFA/2SV is enforced | Organization policy check | | 3.1 | Ensure default network does not exist | Deny `google_compute_network` named "default" | | 4.1 | Ensure Cloud SQL requires SSL | Require `require_ssl: true` | | 5.1 | Ensure Cloud Storage uniform access | Require `uniform_bucket_level_access` | | 6.1.1 | Ensure VM disks are encrypted with CSEK | Require `disk_encryption_key` | | 6.2.1 | Ensure Cloud SQL automated backups | Require `backup_configuration.enabled` | --- ## SOC 2 Type II Control Mapping SOC 2 maps to Trust Service Criteria (TSC). Rego enforcement focuses on the technical controls that support each category. | TSC Category | Control Area | Rego Enforcement Examples | |-------------|-------------|--------------------------| | **CC6.1** | Logical access security | RBAC policies, network segmentation, auth requirements | | **CC6.2** | System credentials | Deny hardcoded secrets, require rotation | | **CC6.3** | Access authorization | Role-based deny rules, least privilege enforcement | | **CC6.6** | Security against threats | Pod security, container isolation, network policies | | **CC6.7** | Restrict data transmission | Require TLS, deny unencrypted protocols | | **CC6.8** | Prevent/detect unauthorized software | Image allowlists, signed images | | **CC7.1** | Detect configuration changes | Audit logging requirements | | **CC7.2** | Monitor for anomalies | Logging and monitoring enforcement | | **CC8.1** | Manage change process | Immutable infrastructure, deployment gates | --- ## NIST 800-53 Control Families | Family | ID | Rego Enforcement Focus | |--------|----|----------------------| | **Access Control** | AC-2, AC-6 | RBAC, least privilege, no wildcard perms | | **Audit** | AU-2, AU-3 | Logging enabled, audit trails | | **Config Management** | CM-2, CM-7 | Baseline configs, minimize functionality | | **Identification** | IA-2, IA-5 | MFA, credential management | | **System Protection** | SC-7, SC-8, SC-28 | Network boundaries, encryption in transit/at rest | | **Syste
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.