@@ -56,17 +56,17 @@ tests:
5656 runAsNonRoot : false
5757 runAsUser : 0
5858
59- - it : Ensure the securityContext for bottlerocket with response_actions includes seLinuxOptions
59+ - it : Ensure the securityContext with response_actions file_acquire includes seLinuxOptions
6060 set :
6161 host :
6262 privileged : false
6363 driver : universal_ebpf
64- cluster_config :
65- cluster_type : bottlerocket
6664 features :
6765 respond :
6866 response_actions :
6967 enabled : true
68+ file_acquire :
69+ trigger : all
7070 asserts :
7171 - isSubset :
7272 path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
@@ -77,13 +77,53 @@ tests:
7777 seLinuxOptions :
7878 type : control_t
7979
80- - it : Ensure the securityContext for bottlerocket without response_actions does not include seLinuxOptions
80+ - it : Ensure the securityContext with response_actions file_quarantine includes seLinuxOptions
81+ set :
82+ host :
83+ privileged : false
84+ driver : universal_ebpf
85+ features :
86+ respond :
87+ response_actions :
88+ enabled : true
89+ file_quarantine :
90+ trigger : all
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+ seLinuxOptions :
99+ type : control_t
100+
101+ - it : Ensure the securityContext with response_actions get_logs includes seLinuxOptions
102+ set :
103+ host :
104+ privileged : false
105+ driver : universal_ebpf
106+ features :
107+ respond :
108+ response_actions :
109+ enabled : true
110+ get_logs :
111+ trigger : all
112+ asserts :
113+ - isSubset :
114+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
115+ content :
116+ allowPrivilegeEscalation : false
117+ seccompProfile :
118+ type : Unconfined
119+ seLinuxOptions :
120+ type : control_t
121+
122+ - it : Ensure the securityContext without response_actions does not include seLinuxOptions
81123 set :
82124 host :
83125 privileged : false
84126 driver : universal_ebpf
85- cluster_config :
86- cluster_type : bottlerocket
87127 features :
88128 respond :
89129 response_actions :
@@ -101,7 +141,7 @@ tests:
101141 seLinuxOptions :
102142 type : control_t
103143
104- - it : Ensure the securityContext for non-bottlerocket with response_actions does not include seLinuxOptions
144+ - it : Ensure the securityContext with response_actions but no higher privilege actions does not include seLinuxOptions
105145 set :
106146 host :
107147 privileged : false
@@ -110,6 +150,14 @@ tests:
110150 respond :
111151 response_actions :
112152 enabled : true
153+ file_acquire :
154+ trigger : none
155+ file_quarantine :
156+ trigger : none
157+ get_logs :
158+ trigger : none
159+ kill_process :
160+ trigger : all
113161 asserts :
114162 - isSubset :
115163 path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
@@ -123,6 +171,25 @@ tests:
123171 seLinuxOptions :
124172 type : control_t
125173
174+ - it : Ensure the securityContext with response_actions defaults to enabled when actions not specified
175+ set :
176+ host :
177+ privileged : false
178+ driver : universal_ebpf
179+ features :
180+ respond :
181+ response_actions :
182+ enabled : true
183+ asserts :
184+ - isSubset :
185+ path : spec.template.spec.containers[?(@.name == "sysdig-host-shield")].securityContext
186+ content :
187+ allowPrivilegeEscalation : false
188+ seccompProfile :
189+ type : Unconfined
190+ seLinuxOptions :
191+ type : control_t
192+
126193 - it : Ensure the security_context is honored
127194 set :
128195 host :
0 commit comments