Skip to content

Conform to the Kubernetes restricted pod security standard #2014

Closed
@dholbach

Description

@dholbach

We should make Flux conform to the Kubernetes restricted pod security standard and update the documentation to reflect this.

Patch the deployment spec for:

  • source-controller
  • kustomize-controller
  • helm-controller
  • notification-controller
  • image-reflector-controller
  • image-automation-controller

From Ada Logics

The deployments of the Flux controllers lack container security options that mitigate privilege escalation risks. These are hardening options that we recommend using, and Flux already
makes use of allowPrivilegeEscalation: false on all of its controllers. However, in addition to the allowPrivilegeEscalation option Flux could harden its containers by:

  • Dropping all Linux capabilities and enabling those needed
  • Filtering syscalls by way of Seccomp

Docker drops many Linux capabilities by default but keeps others for convenience. Flux can harden its containers by having Docker drop all privileges a root user’s process can perform on a system and enabling only those needed. See here for details.

Seccomp filtering is a way of limiting the available system calls and as of v1.19 Kubernetes has support for specifying seccomp policies through the use of seccompProfile in the securityContext of pods. Please see here for details.

Recommendation
Ensure that the pod deployed by Flux has appropriate hardening applied through the use of dropping Linux capabilities and syscall filtering.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions