analyzing-kubernetes-audit-logs

Detect security threats in Kubernetes audit logs by parsing JSON lines.

2|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/balsm-health/Balsm-AI --skill analyzing-kubernetes-audit-logs-balsm-health
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyzing-kubernetes-audit-logs
Source: https://github.com/balsm-health/Balsm-AI/tree/main/plugin/skills/analyzing-kubernetes-audit-logs
Command: npx skills add https://github.com/balsm-health/Balsm-AI --skill analyzing-kubernetes-audit-logs-balsm-health

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires json, argparse, collections, datetime, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps detect security threats in Kubernetes audit logs, providing insights into unauthorized access, privilege escalation, and data exfiltration.

Core Features & Use Cases

  • Security Threat Detection: Identifies security-relevant events such as exec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access.
  • Threat Detection Rules: Builds threat detection rules from audit event patterns.
  • Use Case: When investigating a Kubernetes cluster compromise or building SIEM detection rules for Kubernetes-specific attack techniques.

Quick Start

Analyze the Kubernetes audit log file 'audit.log' to detect security threats.

Frequently Asked Questions about analyzing-kubernetes-audit-logs

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

FAQPage Schema
How do I detect privilege escalation and data exfiltration in Kubernetes audit logs?

You can detect privilege escalation and data exfiltration in Kubernetes audit logs by parsing JSON lines to identify security-relevant events such as unauthorized access, RBAC modifications, and secret access. This requires Python 3.8+ and specific dependencies to analyze the audit events.

What Kubernetes security events can I identify from audit log parsing?

Kubernetes audit log parsing identifies security events including exec-into-pod actions, secret access, RBAC modifications, privileged pod creation, and anonymous API access to help investigate cluster compromises.

Can I use Python to build SIEM detection rules for Kubernetes-specific attack techniques?

Yes, you can use Python 3.8+ to build SIEM detection rules for Kubernetes-specific attack techniques by parsing JSON audit logs and extracting threat detection patterns from unauthorized access and privilege escalation events.

Does Kubernetes audit log analysis work with JSON log files?

Yes, Kubernetes audit log analysis works with JSON log files by parsing JSON lines to detect security threats, provided you have Python 3.8+ and the required dependencies installed to process the audit entries.

What is the best way to investigate a Kubernetes cluster compromise using audit logs?

The best way to investigate a Kubernetes cluster compromise using audit logs is to parse the JSON formatted entries to identify unauthorized access, privilege escalation, and data exfiltration events that indicate security threat patterns.