Skip to content

Instantly share code, notes, and snippets.

@liskl
Last active April 7, 2020 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liskl/96c947e42bc4c1a9028b36f6f3b2a187 to your computer and use it in GitHub Desktop.
Save liskl/96c947e42bc4c1a9028b36f6f3b2a187 to your computer and use it in GitHub Desktop.
disable containers running as root when deployed from a deployment.
package main
deny[msg] {
input.kind = "Deployment"
not input.spec.template.spec.securityContext.runAsNonRoot = true
msg = "Containers must not run as root"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment