Kubernetes check "Prevent binding to privileged ports" (AVD-KSV-0117) may be invalid #7698
Closed
dbowling
started this conversation in
False Detection
Replies: 3 comments
-
@afdesk could you take a look? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dbowling thanks for the report! it's really useful. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dbowling thanks again for the report I've created #7737 to track it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
IDs
AVD-KSV-0117
Description
I started to write this up as a Q&A discussion about why a check exists, but I've found it in the Kubernetes STIG as finding V-242414.
It seems that the validity of this check may not exist in a Kubernetes context; at least not from the
containerPort
spec that is being checked here: https://github.com/aquasecurity/trivy-checks/blame/f7972d6e5978b2d17b9aef3e0d2ccb714922fdb5/checks/kubernetes/pss/baseline/12_privileged_ports_binding.rego#L36-L39There is an open issue in Kubernetes to set the privilaged port sysctl to
0
since it makes no sense in a container. It looks like Docker already did this, and it is merged into the2.0
release for containerd.There appears to be consensus that it is not a valid security concern in Kubernetes pods. Perhaps Trivy should not be marking it as a HIGH finding any more?
Also, as a side note, the documentation didn't make this easy to dig into.
It points to the AVD documentation that links to the pod security standards docs in the Kubernetes documentation, but provides no other sources.
The Kubernetes documentation makes no mention of this as a best practice, even though the STIG does.
Reproduction Steps
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions