Skip to content

Commit

Permalink
Upgrade the digest value.
Browse files Browse the repository at this point in the history
Signed-off-by: Lavish pal <[email protected]>
  • Loading branch information
lavishpal committed Aug 2, 2024
1 parent 4854f24 commit 5250f05
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pod-security-cel/baseline/restrict-sysctls/restrict-sysctls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ spec:
- expression: >-
!has(object.spec.securityContext) ||
!has(object.spec.securityContext.sysctls) ||
object.spec.securityContext.sysctls.all(sysctl, !has(sysctl.name) ||
sysctl.name == 'kernel.shm_rmid_forced' ||
sysctl.name == 'net.ipv4.ip_local_port_range' ||
sysctl.name == 'net.ipv4.ip_unprivileged_port_start' ||
sysctl.name == 'net.ipv4.tcp_syncookies' ||
sysctl.name == 'net.ipv4.ping_group_range')
object.spec.securityContext.sysctls.all(sysctl,
!has(sysctl.name) ||
[
'kernel.shm_rmid_forced',
'net.ipv4.ip_local_port_range',
'net.ipv4.ip_unprivileged_port_start',
'net.ipv4.tcp_syncookies',
'net.ipv4.ping_group_range'
].exists(allowedName, allowedName == (sysctl.name)
message: >-
Setting additional sysctls above the allowed type is disallowed.
The field spec.securityContext.sysctls must be unset or not use any other names
Expand Down

0 comments on commit 5250f05

Please sign in to comment.