Detection rules › Falco

Service Account Created in Kube Namespace

Severity
WARNING
Source
k8saudit

Detect any attempt to create a serviceaccount in the kube-system or kube-public namespaces

Telemetry coverage

Rules detecting the same action

These rules filter on the same operation.

Stages and Predicates

Stage 1: falco_condition

and
  not
    objectRef.name in ["coredns", "coredns-autoscaler", "cronjob-controller", "daemon-set-controller", "deployment-controller", "disruption-controller", "endpoint-controller", "endpointslice-controller", "endpointslicemirroring-controller", "generic-garbage-collector", "horizontal-pod-autoscaler", "job-controller", "namespace-controller", "node-controller", "persistent-volume-binder", "pod-garbage-collector", "pv-protection-controller", "pvc-protection-controller", "replicaset-controller", "resourcequota-controller", "root-ca-cert-publisher", "service-account-controller", "statefulset-controller"]
  objectRef.namespace in ["kube-public", "kube-system"]
  objectRef.resource eq "serviceaccounts"
  responseStatus.code starts_with "2"
  stage eq "ResponseComplete"
  verb eq "create"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
objectRef.nameincoredns, coredns-autoscaler, cronjob-controller, daemon-set-controller, deployment-controller, disruption-controller, endpoint-controller, endpointslice-controller, endpointslicemirroring-controller, generic-garbage-collector, horizontal-pod-autoscaler, job-controller, namespace-controller, node-controller, persistent-volume-binder, pod-garbage-collector, pv-protection-controller, pvc-protection-controller, replicaset-controller, resourcequota-controller, root-ca-cert-publisher, service-account-controller, statefulset-controllerexcludes:objectRef.name

Indicators

These rows show field, operator, and value matches.