File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ capabilities:
201201allowPrivilegeEscalation: false
202202seccompProfile:
203203 type: Unconfined
204- { {- if (include " common.cluster_type.is_bottlerocket" .) } }
204+ { {- if and ( eq ( include " host.response_actions_enabled " .) " true " ) (include " common.cluster_type.is_bottlerocket" .) } }
205205seLinuxOptions:
206206 type: control_t
207207{ {- end } }
Original file line number Diff line number Diff line change @@ -150,6 +150,10 @@ tests:
150150 privileged : false
151151 cluster_config :
152152 cluster_type : bottlerocket
153+ features :
154+ respond :
155+ response_actions :
156+ enabled : true
153157 asserts :
154158 - isSubset :
155159 path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
Original file line number Diff line number Diff line change @@ -56,13 +56,17 @@ tests:
5656 runAsNonRoot : false
5757 runAsUser : 0
5858
59- - it : Ensure the securityContext for bottlerocket includes seLinuxOptions
59+ - it : Ensure the securityContext for bottlerocket with response_actions includes seLinuxOptions
6060 set :
6161 host :
6262 privileged : false
6363 driver : universal_ebpf
6464 cluster_config :
6565 cluster_type : bottlerocket
66+ features :
67+ respond :
68+ response_actions :
69+ enabled : true
6670 asserts :
6771 - isSubset :
6872 path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
@@ -73,6 +77,52 @@ tests:
7377 seLinuxOptions :
7478 type : control_t
7579
80+ - it : Ensure the securityContext for bottlerocket without response_actions does not include seLinuxOptions
81+ set :
82+ host :
83+ privileged : false
84+ driver : universal_ebpf
85+ cluster_config :
86+ cluster_type : bottlerocket
87+ features :
88+ respond :
89+ response_actions :
90+ enabled : false
91+ asserts :
92+ - isSubset :
93+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
94+ content :
95+ allowPrivilegeEscalation : false
96+ seccompProfile :
97+ type : Unconfined
98+ - isNotSubset :
99+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
100+ content :
101+ seLinuxOptions :
102+ type : control_t
103+
104+ - it : Ensure the securityContext for non-bottlerocket with response_actions does not include seLinuxOptions
105+ set :
106+ host :
107+ privileged : false
108+ driver : universal_ebpf
109+ features :
110+ respond :
111+ response_actions :
112+ enabled : true
113+ asserts :
114+ - isSubset :
115+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
116+ content :
117+ allowPrivilegeEscalation : false
118+ seccompProfile :
119+ type : Unconfined
120+ - isNotSubset :
121+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
122+ content :
123+ seLinuxOptions :
124+ type : control_t
125+
76126 - it : Ensure the security_context is honored
77127 set :
78128 host :
You can’t perform that action at this time.
0 commit comments