用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-gke-v180-5-1-4命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-gke-v180-5.1.4 |
| description | Ensure only trusted container images are used (Manual) |
| category | cis-gke |
| version | 1.8.0 |
| author | cyberstrike-official |
| tags | ["cis","gke","kubernetes","gcp","image-registry","image-scanning","artifact-registry","vulnerability-scanning"] |
| cis_id | 5.1.4 |
| cis_benchmark | CIS Google Kubernetes Engine (GKE) Benchmark v1.8.0 |
| tech_stack |
| ["kubernetes","gcp","gke"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Use Binary Authorization to allowlist (whitelist) only approved container registries.
Allowing unrestricted access to external container registries provides the opportunity for malicious or unapproved containers to be deployed into the cluster. Ensuring only trusted container images are used reduces this risk.
All container images to be deployed to the cluster must be hosted within an approved container image registry. If public registries are not on the allowlist, a process for bringing commonly used container images into an approved private registry and keeping them up to date will be required.
Using Google Cloud Console: To check that Binary Authorization is enabled for the GKE cluster:
Using Command Line: Check that Binary Authorization is enabled for the GKE cluster, first define 2 variables for Cluster Name and Zone, and then run the command below:
gcloud container clusters describe $CLUSTER_NAME --zone $COMPUTE_ZONE --format json | jq .binaryAuthorization
This will return one of 2 possible responses if Binary Authorization is enabled:
{
"evaluationMode": "PROJECT_SINGLETON_POLICY_ENFORCE"
}
OR
{
"evaluationMode": "PROJECT_SINGLETON_POLICY_AUDIT_AND_WARN"
}
Then, assess the contents of the policy:
gcloud container binauthz policy export > current-policy.yaml
Ensure the current policy is not configured to allow all images (evaluationMode: ALWAYS_ALLOW):
cat current-policy.yaml
...
defaultAdmissionRule:
evaluationMode: ALWAYS_ALLOW
Using Google Cloud Console
Edit Binary Authorization.Enable Binary Authorization.Enforce policy and provide a directory for the policy to be used.SAVE CHANGES.Using Command Line: Update the cluster to enable Binary Authorization:
gcloud container cluster update <cluster_name> --zone <compute_zone> --binauthz-evaluation-mode=<evaluation_mode>
Example:
gcloud container clusters update $CLUSTER_NAME --zone $COMPUTE_ZONE --binauthz-evaluation-mode=PROJECT_SINGLETON_POLICY_ENFORCE
See: https://cloud.google.com/sdk/gcloud/reference/container/clusters/update#--binauthz-evaluation-mode for more details around the evaluation modes available.
Create a Binary Authorization Policy using the Binary Authorization Policy Reference: https://cloud.google.com/binary-authorization/docs/policy-yaml-reference for guidance.
Import the policy file into Binary Authorization:
gcloud container binauthz policy import <yaml_policy>
By default, Binary Authorization is disabled along with container registry allowlisting.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 2.5 Allowlist Authorized Software | x | x | |
| v7 | 5.2 Maintain Secure Images | x | x | |
| v7 | 5.3 Securely Store Master Images | x | x |