Skip to content

Commit

Permalink
run as non root by default
Browse files Browse the repository at this point in the history
  • Loading branch information
KauzClay committed Sep 13, 2023
1 parent a072003 commit 11c7925
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/serving/v1/revision_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ func (rs *RevisionSpec) defaultSecurityContext(psc *corev1.PodSecurityContext, c
}
}

updatedSC.RunAsNonRoot = ptr.Bool(true)

if *updatedSC != (corev1.SecurityContext{}) {
container.SecurityContext = updatedSC
}
Expand Down

0 comments on commit 11c7925

Please sign in to comment.