OpenParable
Skip to content
← Back to skills

Cis Aks V170 4.1.5

DevOps & Security
cis-aks-v170-4.1.5

Cis Aks V170 4.1.5 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Ensure that default service accounts are not actively used (Automated)

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Server_Software/Kubernetes/CIS_Azure_Kubernetes_Service_AKS_Benchmark_v1.7.0/cis-aks-v170-4.1.5/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-aks-v170-4-1-5, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

4.1.5 Ensure that default service accounts are not actively used (Automated)

Profile Applicability

  • Level 1

Description

The default service account should not be used to ensure that rights granted to applications can be more easily audited and reviewed.

Rationale

Kubernetes provides a default service account which is used by cluster workloads where no specific service account is assigned to the pod.

Where access to the Kubernetes API from a pod is required, a specific service account should be created for that pod, and rights granted to that service account.

The default service account should be configured such that it does not provide a service account token and does not have any explicit rights assignments.

Impact

All workloads which require access to the Kubernetes API will require an explicit service account to be created.

Audit

For each namespace in the cluster, review the rights assigned to the default service account and ensure that it has no roles or cluster roles bound to it apart from the defaults.

Additionally ensure that the automountServiceAccountToken: false setting is in place for each default service account.

Remediation

Create explicit service accounts wherever a Kubernetes workload requires specific access to the Kubernetes API server.

Modify the configuration of each default service account to include this value:

automountServiceAccountToken: false

Automatic remediation for the default account:

kubectl patch serviceaccount default -p '$automountServiceAccountToken: false'

Default Value

By default the default service account allows for its service account token to be mounted in pods in its namespace.

References

  1. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  2. https://docs.microsoft.com/security/benchmark/azure/security-controls-v2-identity-management#im-2-manage-application-identities-securely-and-automatically

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v84.7 Manage Default Accounts on Enterprise Assets and Softwarexxx
v85.4 Restrict Administrator Privileges to Dedicated Administrator Accountsxxx
v74.3 Ensure the Use of Dedicated Administrative Accountsxxx
v75.2 Maintain Secure Imagesxx