用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-docker-v170-5-26命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-docker-v170-5.26 |
| description | Ensure that the container is restricted from acquiring additional privileges |
| category | cis-docker |
| version | 1.7.0 |
| author | cyberstrike-official |
| tags | ["cis","docker","runtime","privileges","no-new-privileges"] |
| cis_id | 5.26 |
| cis_benchmark | CIS Docker Benchmark v1.7.0 |
| tech_stack | ["docker"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
You should restrict the container from acquiring additional privileges via suid or sgid bits.
A process can set the no_new_priv bit in the kernel and this persists across forks, clones and execve. The no_new_priv bit ensures that the process and its child processes do not gain any additional privileges via suid or sgid bits. This reduces the danger associated with many operations because the possibility of subverting privileged binaries is lessened.
The no_new_priv option prevents LSMs like SELinux from allowing processes to acquire new privileges
You should run the following command:
docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: SecurityOpt={{ .HostConfig.SecurityOpt }}'
This command should return all the security options currently configured for containers. no-new-privileges should be one of them.
Note that the SecurityOpt response will be empty (i.e. SecurityOpt=<no value>) even if "no-new-privileges": true has been configured in the Docker daemon.json configuration file.
You should start your container with the options below:
docker run --rm -it --security-opt=no-new-privileges ubuntu bash
By default, new privileges are not restricted.
v8:
v7: