【文件属性】:
文件名称:psp-allow-privilege-escalation:Kubewarden Pod安全策略,用于控制allowPrivilegeEscalation的使用
文件大小:19KB
文件格式:ZIP
更新时间:2021-04-15 01:26:08
kubernetes webassembly policy-as-code kubernetes-security Rust
持续集成
执照
该Kubewarden策略替代了Kubernetes Pod安全策略,该策略限制了的使用。
政策如何运作
此策略拒绝启用了allowPrivilegeEscalation安全上下文的所有allowPrivilegeEscalation 。
该策略还会检查initContainers 。
例子
由于nginx容器已启用allowPrivilegeEscalation因此以下Pod将被拒绝:
apiVersion : v1
kind : Pod
metadata :
name : nginx
spec :
containers :
- name : nginx
image : nginx
securityContext :
allowPrivilegeEscalation : true
- name : sidecar
【文件预览】:
psp-allow-privilege-escalation-main
----Cargo.lock(9KB)
----.github()
--------workflows()
----LICENSE(11KB)
----src()
--------settings.rs(252B)
--------lib.rs(4KB)
----Cargo.toml(344B)
----.gitignore(14B)
----test_data()
--------req_pod_without_security_context.json(4KB)
--------req_pod_with_init_container_with_security_context_and_allowPrivilegeEscalation.json(5KB)
--------req_pod_with_container_with_security_context_and_allowPrivilegeEscalation.json(5KB)
--------req_pod_with_allowPrivilegeEscalation_disabled.json(5KB)
----Makefile(616B)
----README.md(2KB)