Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
georgibaltiev committed Jan 9, 2025
1 parent 87253e9 commit e1ff7c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (r *Rule2001) Run(ctx context.Context) (rule.RuleResult, error) {
if securityContext.Capabilities != nil {
// CAP_SYS_ADMIN only works on CRI-O. ref: https://github.com/kubernetes/kubernetes/issues/119568
// Valiadated with `ubuntu` container, to check enabled capabilities the `capsh --print` command can be used.
addsCapSysAdmin = slices.ContainsFunc(securityContext.Capabilities.Add, func(cap corev1.Capability) bool {
return strings.ToUpper(string(cap)) == "SYS_ADMIN" || strings.ToUpper(string(cap)) == "CAP_SYS_ADMIN"
addsCapSysAdmin = slices.ContainsFunc(securityContext.Capabilities.Add, func(capability corev1.Capability) bool {
return strings.ToUpper(string(capability)) == "SYS_ADMIN" || strings.ToUpper(string(capability)) == "CAP_SYS_ADMIN"
})
}

Expand Down

0 comments on commit e1ff7c2

Please sign in to comment.