UNCLASSIFIED - NO CUI

Skip to content

Mitigate automountServiceAccountToken findings

Justen Mehl requested to merge harden-automounting into main

General MR

Summary

Related to https://repo1.dso.mil/big-bang/product/packages/cluster-auditor/-/issues/79

This MR includes template modifications to disable API token auto-mounting for the opa-exporter ServiceAccount.

This essentially means that Pods leveraging the opa-exporter ServiceAccount, by default, will not have access to their Kubernetes API token (previously mounted at /var/run/secrets/kubernetes.io/serviceaccount/token).

Since this package deals with the Kubernetes API heavily - the cluster-auditor Pod will override this behavior at the Pod spec-level here. As such, a Kyverno policy exception will be made for this Pod.

Testing has shown no loss of functionality - but if the codeowners are aware of any potential breakage, please let me know!

This is in support of epic &146.

Edited by Justen Mehl

Merge request reports