apps(secops): scoped read-only auditor SA + ClusterRole (F8) #40

Merged
sirius merged 1 commit from apps/secops-auditor into master 2026-11-27 05:08:29 +00:00
Owner

Audit finding F8: no read-only identity existed, so every security run used kubernetes-admin.

  • ns secops, SA secops-auditor
  • ClusterRole secops-auditor: get/list/watch on pods, services, endpoints, events, configmaps, namespaces, nodes; get/list/watch on apps, batch, networking.k8s.io, gateway.networking.k8s.io, cilium.io; get on pods/log
  • No secrets, no pods/exec, no pods/attach, no write verbs, no impersonate/escalate/bind; not bound to view/edit/admin

The token is generated out of band into ~/.kube/secops.yaml (600) and is not in git.

Audit finding F8: no read-only identity existed, so every security run used `kubernetes-admin`. - ns `secops`, SA `secops-auditor` - ClusterRole `secops-auditor`: get/list/watch on pods, services, endpoints, events, configmaps, namespaces, nodes; get/list/watch on `apps`, `batch`, `networking.k8s.io`, `gateway.networking.k8s.io`, `cilium.io`; get on `pods/log` - **No** `secrets`, **no** `pods/exec`, **no** `pods/attach`, no write verbs, no impersonate/escalate/bind; not bound to view/edit/admin The token is generated out of band into `~/.kube/secops.yaml` (600) and is not in git.
Security runs had no read-only identity: every audit ran as kubernetes-admin
(system:masters), the identity that can delete the cluster, so the auditor was
the largest privilege holder in the environment.

New ns secops with SA secops-auditor bound to a from-scratch ClusterRole:

  get,list,watch  pods services endpoints events configmaps namespaces nodes
  get,list,watch  * in apps, batch, networking.k8s.io,
                    gateway.networking.k8s.io, cilium.io
  get             pods/log

Deliberately absent: secrets (all verbs), pods/exec, pods/attach, every write
verb, impersonate/escalate/bind. Not bound to view/edit/admin (all three carry
Secrets; edit reads Secret data).

The bearer token is a credential and is generated out of band into
~/.kube/secops.yaml (mode 600) — see the SA manifest comment for the one-liner.
sirius merged commit ac19ffb340 into master 2026-11-27 05:08:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/homek8s!40
No description provided.