Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mukul975 avatar

Analyzing Kubernetes Audit Logs

  • 336 installs
  • 27.3k repo stars
  • Updated August 2, 2026
  • mukul975/anthropic-cybersecurity-skills

Analyzing Kubernetes Audit Logs is an agent skill that guides review of K8s API audit events for security threats, misconfigurations, and incident timelines.

About

Analyzing Kubernetes Audit Logs is a security-oriented agent skill for solo builders and small teams who run workloads on Kubernetes and need to understand control-plane activity beyond metrics dashboards. Audit logs record requests to the API server—who created roles, patched secrets, exec’d into pods, or changed network policies—making them essential for ship-phase security reviews and operate-phase incident response. Use the skill when you are hardening a cluster before launch, investigating suspicious changes, or documenting access for compliance. It emphasizes structured review of audit events rather than ad-hoc kubectl grepping. Pair it with your cluster’s audit policy configuration and log shipping setup; outputs are findings and timelines you can act on in RBAC, admission controls, or monitoring.

  • Kubernetes audit log investigation workflow for API server events
  • Threat-hunting patterns for privileged operations and configuration drift
  • Supports pre-launch security review and post-incident forensics on clusters
  • Fits solo operators running K8s on managed clouds or self-hosted control planes
  • Part of Anthropic cybersecurity skills corpus (Apache-2.0 licensed)

Analyzing Kubernetes Audit Logs by the numbers

  • 336 all-time installs (skills.sh)
  • +21 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #598 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill analyzing-kubernetes-audit-logs

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs336
repo stars27.3k
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositorymukul975/anthropic-cybersecurity-skills

What it does

Investigate Kubernetes API activity, spot risky changes, and support incident or compliance reviews from cluster audit logs.

Who is it for?

Best when you're shipping on Kubernetes and must pass a security self-review without a full SOC team.

Skip if: Skip if you have no Kubernetes footprint or those and only need application-level unit tests without cluster forensics.

When should I use this skill?

You need to investigate Kubernetes API server audit logs for security issues, compliance evidence, or incident timelines.

What you get

You produce a prioritized read of suspicious API activity, affected resources, and follow-up hardening or monitoring steps.

  • Prioritized suspicious event list
  • Incident or review timeline
  • Recommended RBAC or policy follow-ups

Files

SKILL.mdMarkdownGitHub ↗

Analyzing Kubernetes Audit Logs

When to Use

  • When investigating security incidents that require analyzing kubernetes audit logs
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Familiarity with container security concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Instructions

Parse Kubernetes audit log files (JSON lines format) to detect security-relevant events including unauthorized access, privilege escalation, and data exfiltration.

import json

with open("/var/log/kubernetes/audit.log") as f:
    for line in f:
        event = json.loads(line)
        verb = event.get("verb")
        resource = event.get("objectRef", {}).get("resource")
        user = event.get("user", {}).get("username")
        if verb == "create" and resource == "pods/exec":
            print(f"Pod exec by {user}")

Key events to detect: 1. pods/exec and pods/attach (shell into containers) 2. secrets access (get/list/watch) 3. clusterrolebindings creation (RBAC escalation) 4. Privileged pod creation 5. Anonymous or system:unauthenticated access

Examples

# Detect secret enumeration
if verb in ("get", "list") and resource == "secrets":
    print(f"Secret access: {user} -> {event['objectRef'].get('name')}")

Related skills

How it compares

Cluster audit forensics skill—not a generic linter or non-Kubernetes cloud trail analyzer.

FAQ

Who is analyzing-kubernetes-audit-logs for?

Developers and operators on Kubernetes who need to interpret audit logs for security reviews, incidents, or compliance evidence.

When should I use analyzing-kubernetes-audit-logs?

In ship during security review before production; in operate when investigating anomalies, RBAC changes, or secret access after an alert.

Is analyzing-kubernetes-audit-logs safe to install?

Treat cluster logs as sensitive; review the Security Audits panel on this page and limit agent permissions to least-privilege kube access.

Securityauditappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.