Skip to content

Commit f5369d0

Browse files
committed
policy: Add validation for ApparmorProfile in ExecProcessRequest and CreateContainerRequest
Add these validations to enforce the runtime default ApparmorProfile settings on the container Signed-off-by: Ankita Pareek <[email protected]>
1 parent cf6c4ce commit f5369d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/genpolicy/rules.rego

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ allow_create_container_input(req) {
314314
i_process := i_oci.Process
315315
count(i_process.SelinuxLabel) == 0
316316
count(i_process.User.Username) == 0
317-
317+
count(i_process.ApparmorProfile) == 0
318+
318319
print("allow_create_container_input: true")
319320
}
320321

@@ -1644,6 +1645,7 @@ allow_exec_process_input(req){
16441645

16451646
i_process := req.process
16461647
count(i_process.SelinuxLabel) == 0
1648+
count(i_process.ApparmorProfile) == 0
16471649

16481650
print("allow_exec_process_input: true")
16491651
}

0 commit comments

Comments
 (0)