review-security-k8s-service-accounts

Analyze Kubernetes ServiceAccount configurations for least privilege and secure identity boundaries.

42|32|Updated May 7, 2026
One-click install
npx skills add https://github.com/gke-labs/kube-agents --skill review-security-k8s-service-accounts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-security-k8s-service-accounts
Source: https://github.com/gke-labs/kube-agents/tree/main/.agents/skills/review-security-k8s-service-accounts
Command: npx skills add https://github.com/gke-labs/kube-agents --skill review-security-k8s-service-accounts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the risk of over-privileged Kubernetes ServiceAccounts, which are a common vector for lateral movement and privilege escalation within a cluster.

Core Features & Use Cases

  • Least Privilege Enforcement: Identifies ServiceAccounts with excessive RBAC permissions or default token usage.
  • Identity Boundary Auditing: Detects shared identities across workloads and flags insecure token automounting configurations.
  • Use Case: Use this tool during a security sprint to scan your production namespaces for orphaned ServiceAccounts or those using long-lived tokens that should be replaced with ephemeral TokenRequest API calls.

Quick Start

Ask the agent to review all service account configurations in the production namespace for potential security violations.

Frequently Asked Questions about review-security-k8s-service-accounts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Kubernetes service accounts for over-privileged RBAC roles?

To audit Kubernetes service accounts for over-privileged RBAC roles, analyze RBAC bindings and validate workload identity mappings to enforce least privilege and detect excessive permissions across cluster namespaces.

How do I check Kubernetes service accounts for insecure token automounting?

Checking Kubernetes service accounts for insecure token automounting involves evaluating token automounting settings to detect default token usage and ensure secure identity boundaries across your workloads.

What is the best way to enforce least privilege for Kubernetes service accounts?

The best way to enforce least privilege for Kubernetes service accounts is to validate strict 1:1 app-to-account mapping and assess RBAC configurations to prevent over-privileged identities and lateral movement risks.

When do I need to replace long-lived Kubernetes service account tokens?

You need to replace long-lived Kubernetes service account tokens during security sprints to comply with best practices, switching to ephemeral tokens generated via the TokenRequest API for secure identity boundaries.

Can I use this audit to find orphaned service accounts in production namespaces?

Yes, you can use this audit to find orphaned service accounts in production namespaces by evaluating workload identity mappings and ServiceAccount configurations to detect unused or shared identities.

Does Kubernetes workload identity auditing detect shared identities across workloads?

Kubernetes workload identity auditing detects shared identities across workloads by evaluating 1:1 app-to-account mapping and analyzing service account configurations to flag insecure identity boundaries.