描述
- 通过开启容器内的文件系统只读功能,可以降低被容器中的恶意进程恶意修改系统文件或敏感文件的风险。
- 如果确认当前工作负载确实无法实现文件系统只读的话,可以忽略此检查项。
加固建议
- 修改工作负载的 Pod Spec 中的 securityContext 定义,增加 readOnlyRootFilesystem: true,如果有需要修改某个目录下文件的需求,可以通过 volumeMounts 实现。
扩展阅读
- Configure a Security Context for a Pod or Container | Kubernetes
- Volumes | Kubernetes