Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue 1166: Allow CAP_NET_RAW and NET_RAW drop capabilities #1168

Merged
merged 5 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,20 @@ spec:
securityContext:
capabilities:
drop:
- CAP_NET_RAW
- CAP_NET_RAW
---
apiVersion: v1
kind: Pod
metadata:
name: drop-netraw-good
spec:
containers:
- args:
- sleep
- infinity
image: ghcr.io/kyverno/test-busybox:1.35
name: busybox
securityContext:
capabilities:
drop:
- NET_RAW
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ readme: |
annotations:
kyverno/category: "Best Practices"
kyverno/subject: "Pod"
digest: 97e963f073e6324fa514015bc8fd8564b93fb7da6f8564fcf8a8fefc4c9da784
digest: 357011bf6ef0268a0ca1b248e0c7a59fc42e7f2017d02838c85711c329130676
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ spec:
all:
- key: CAP_NET_RAW
operator: AnyNotIn
value: "{{ element.securityContext.capabilities.drop[].to_upper(@) || `[]` }}"
value: "{{ element.securityContext.capabilities.drop[].to_upper(@) || `[]` }}"
- key: NET_RAW
operator: AnyNotIn
value: "{{ element.securityContext.capabilities.drop[].to_upper(@) || `[]` }}"
Loading