Skip to content

Instantly share code, notes, and snippets.

@liskl
Last active April 7, 2020 13:40
Show Gist options
  • Select an option

  • Save liskl/96c947e42bc4c1a9028b36f6f3b2a187 to your computer and use it in GitHub Desktop.

Select an option

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