kubescape/regolibrary
Vedi su GitHubAdd rego rule to check for windows securityContext compliance
Open
#317 aperta il 6 mar 2023
enhancementgood first issue
Metriche repository
- Star
- (131 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
In order to support Windows system, we should add rego rules to check for securityContext parameters also for this OS.
Reading from the official documentation, we should implement a control for each of the following listed fields: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#windowssecuritycontextoptions-v1-core
So, the new checks to be added, are the following:
gmsaCredentialSpecgmsaCredentialSpecNamehostProcessrunAsUserName
The equivalent rules should be named like so:
set-gmsacredentialspec-valueset-gmsacredentialspecname-valueset-hostprocess-true(checking also ifWindowsHostProcessContainersfeature flag is enabled inapi-server)runAsUserName