For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

The --service-account-lookup argument is not set to true misconfiguration detected in code

Rule Details

Cortex AppSec Rule ID

APPSEC_K8S_96

Category - Subcategory

Kubernetes - Native Security Controls

Provider

OTHER

Severity

HIGH

Framework

Helm, Kubernetes, Kustomize

Impact

Validate service account before validating token. If --service-account-lookup is not enabled, the apiserver only verifies that the authentication token is valid, and does not validate that the service account token mentioned in the request is actually present in etcd. This allows using a service account token even after the corresponding service account is deleted. This is an example of time of check to time of use security issue.

How to Fix

Kind: Pod [source,go]

{ "apiVersion: v1 kind: Pod metadata: creationTimestamp: null labels: component: kube-apiserver tier: control-plane name: kube-apiserver namespace: kube-system spec: containers:

  • command:

    • kube-apiserver

    • --service-account-lookup=true image: gcr.io/google_containers/kube-apiserver-amd64:v1.6.0 ...", }


Last updated

Was this helpful?