Agent skill

Defender For Containers

by vinayaklatthe in vinayaklatthe/microsoft-security-skills

Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift.

MITAuto-check passedDevOps & Cloud

Install Defender For Containers

skills CLI
$ npx skills add vinayaklatthe/microsoft-security-skills --skill defender-for-containers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vinayaklatthe/microsoft-security-skills defender-for-containers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vinayaklatthe/microsoft-security-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/defender-for-containers .claude/skills/defender-for-containers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
defender-for-containers
GitHub stars
175
Token cost
~2.1k tokens
SKILL.md length
839 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift.

  • Works in 8 steps: Enable Defender for Containers at… → Connect non-Azure clusters via Arc.… → Registry scanning posture. Turn on… → …
  • VM/host hardening (use defender-for-servers)
  • SKILL.md covers When to use, Capability map, Approach and Guardrails, plus 3 more sections
  • Calls kubectl

What it does

Defender For Containers is an agent skill from vinayaklatthe/microsoft-security-skills. Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift. Covers agentless discovery, agentless vulnerability assessment for images and running containers (powered by Microsoft Defender Vulnerability Management), runtime threat detection via the Defender sensor (eBPF on Linux), Kubernetes data plane hardening with Azure Policy / Gatekeeper, registry scanning for ACR / ECR / GAR, admission control, attack path analysis, and…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Vulnerability scanning, Container orchestration and Network security. It works with Kubernetes, Microsoft Defender, Microsoft Azure and Google Kubernetes Engine. The repository describes itself as: Curated Microsoft Security skills for AI agents - Defender, Sentinel, Entra, Purview, Intune, Security Copilot. The licence is MIT.

When your agent uses it

  • VM/host hardening (use defender-for-servers)
  • AKS networking design (use azure-network-security-design)
  • General AKS day-2 ops unrelated to security

Example prompts

  • “/defender-for-containers”

Requirements

  • Docker

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Enable Defender for Containers at subscription scope. Auto-provisioning installs
  2. Connect non-Azure clusters via Arc. EKS/GKE need a connector at the AWS/GCP cloud
  3. Registry scanning posture. Turn on continuous scanning so newly-disclosed CVEs
  4. Image vuln management at the pipeline. Don't wait for runtime: integrate the same
  5. Runtime threat detection — sensor or agentless?
  6. Admission control with Azure Policy / Gatekeeper. Roll out as audit for 14 days,
  7. Attack path analysis — review weekly. The high-value paths to fix first are
  8. Stream alerts to Sentinel via the Defender for Cloud connector. Build hunting queries

What it can do on your machine

Read from SKILL.md and the folder at commit 15f16df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • kubectl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Defender For Containers loads about 2.1k tokens when it runs. Until then it costs about 260 tokens; SKILL.md has 839 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~260
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vinayaklatthe/microsoft-security-skills at commit 15f16df, republished under its MIT licence (© vinayaklatthe). 839 words, ~2,077 tokens.

Download SKILL.mdSave it as .claude/skills/defender-for-containers/SKILL.md (or your agent's skills folder).
name
defender-for-containers
description
Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift. Covers agentless discovery, agentless vulnerability assessment for images and running containers (powered by Microsoft Defender Vulnerability Management), runtime threat detection via the Defender sensor (eBPF on Linux), Kubernetes data plane hardening with Azure Policy / Gatekeeper, registry scanning for ACR / ECR / GAR, admission control, attack path analysis, and Sentinel integration. WHEN: Defender for Containers, AKS security, container runtime threat detection, Kubernetes admission control, image vulnerability scanning, ACR scan, EKS GKE security in Defender for Cloud, K8s posture, container attack path, Defender container sensor, Gatekeeper Azure Policy AKS, agentless container scan. DO NOT USE for VM/host hardening (use defender-for-servers), AKS networking design (use azure-network-security-design), or general AKS day-2 ops unrelated to security.
license
MIT
metadata.author
Microsoft
metadata.version
0.1.0

Microsoft Defender for Containers

Defender for Containers is the Kubernetes-aware plan in Microsoft Defender for Cloud. It covers AKS, Azure Arc-enabled Kubernetes (on-prem, EKS, GKE, OpenShift), and the container registries that feed them, providing posture, image vulnerability assessment, runtime threat detection, and admission control.

When to use

Securing Kubernetes clusters and the registries that supply them. Use this skill for plan rollout, sensor vs agentless trade-offs, registry scanning, admission policy design, and runtime alert response.

Do not use this skill for VM/host hardening (defender-for-servers), cluster networking design (azure-network-security-design), or generic AKS operations (azure-kubernetes).

Capability map

CapabilityHow it worksCoverage
Agentless discoveryAPI-based cluster inventory, control-plane misconfig, K8s API audit log analyticsAKS, EKS, GKE, Arc
Agentless vulnerability assessmentSnapshots node disks; scans images in registries and running containersAKS, EKS, GKE
Registry scanningPull-time, push-time, and continuous scan of imagesACR, ECR, GAR
Runtime threat detectionDefender sensor (DaemonSet, eBPF on Linux) — fileless, lateral movement, crypto-miner detectionsAKS, Arc, EKS, GKE
Kubernetes data plane hardeningAzure Policy add-on (OPA/Gatekeeper)AKS, Arc-enabled K8s
Attack path analysisCombines posture + vuln + runtime to surface internet → pod → cloud-IAM pathsAll

Approach

  1. Enable Defender for Containers at subscription scope. Auto-provisioning installs:

    • Defender sensor (DaemonSet) for runtime detection on Linux nodes.
    • Azure Policy for Kubernetes add-on for admission control.
    • Connects ACR scanning automatically. Verify: kubectl get ds -n kube-system shows microsoft-defender-collector-ds; AKS shows Defender profile = enabled.
  2. Connect non-Azure clusters via Arc. EKS/GKE need a connector at the AWS/GCP cloud account level + Arc onboarding for runtime sensor (agentless features work without sensor).

  3. Registry scanning posture. Turn on continuous scanning so newly-disclosed CVEs raise findings on already-pushed images, not just at push time. Set retention so you can answer "is image X vulnerable to CVE-Y" 90 days later.

  4. Image vuln management at the pipeline. Don't wait for runtime: integrate the same MDVM API into CI to fail builds on critical, exploitable CVEs. Pair with image signing (Notation / cosign) and admission control to require signed images.

  5. Runtime threat detection — sensor or agentless?

    • Sensor required for: fileless attacks, process tree, in-memory exploitation, lateral movement, reverse shell.
    • Agentless covers: image vuln, posture, K8s API audit-based detections.
    • Use both in production. Sensor only on Linux node pools (Windows runtime sensor coverage is limited).
  6. Admission control with Azure Policy / Gatekeeper. Roll out as audit for 14 days, then deny. Baseline policies:

    • No privileged containers.
    • No hostPath mounts to sensitive paths.
    • Required readOnlyRootFilesystem for app workloads.
    • Required resource limits.
    • Required signed images (allowlist registries).
  7. Attack path analysis — review weekly. The high-value paths to fix first are internet-exposed pod with critical CVE → workload identity → cloud IAM. Prioritise by blast radius, not finding count.

  8. Stream alerts to Sentinel via the Defender for Cloud connector. Build hunting queries on SecurityAlert filtered to ProductName = "Microsoft Defender for Containers".

Show full SKILL.md (370 more words)Show less

Guardrails

  • Defender sensor is required for runtime detection. Agentless alone won't catch reverse shells or crypto miners running inside pods.
  • Roll admission policies in audit first. A requiredLabels policy in deny mode on day one will brick deployments.
  • Don't run two privileged DaemonSets that hook the kernel (e.g., Defender sensor + Falco + a third-party EDR) without testing — eBPF program collisions and node instability.
  • ACR + private endpoint + Defender scanning needs careful network design. The scanner must reach the registry; verify private DNS resolution and trusted-services bypass.
  • Don't scope plan to a single cluster's RG. New clusters in other RGs go unprotected. Subscription scope + policy enforcement.
  • Windows containers have limited sensor coverage. Compensate with stricter admission control and image scanning for Windows workloads.
  • Image vuln findings without exploitability context are noise. Always filter by exploitable / KEV before triage.

Common anti-patterns

  • "Agentless only because the sensor adds 80 MB of RAM per node" — and you have no runtime detection. Budget the RAM.
  • "Admission policy in deny on day one" — outage. 14-day audit, fix violations, then deny.
  • "Image scanning at push only" — tomorrow's CVE on yesterday's image goes unflagged. Continuous scanning on.
  • "CI ignores MDVM findings — we'll catch it at runtime" — vulnerabilities reach prod; rollback is expensive. Fail the build on critical exploitable.
  • "All clusters in scope, no exemptions for sandbox" — alert volume buries real incidents. Tag/scope sandbox out of admission deny + alert routing.
  • "Used Defender for Containers for VM hosts running Docker directly" — wrong tool; that's a defender-for-servers scenario.
  • "Skipped Arc for EKS/GKE because connector is enough" — no runtime sensor, no eBPF detections.

Example prompts

  • Enable Defender for Containers across 5 subs with AKS clusters; pilot on dev for 7 days.
  • Roll out Azure Policy for Kubernetes admission control — baseline policy set in audit.
  • Connect 3 EKS clusters via Arc and enable runtime sensor.
  • Build a CI gate that fails on critical exploitable CVEs from MDVM.
  • Investigate a "Crypto-mining activity in container" alert — runbook + KQL.
  • Tune attack path analysis to surface only internet-to-cloud-IAM paths.
  • Design admission control to require signed images from approved ACRs only.

Microsoft Learn

© vinayaklatthe, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/defender-for-containers of vinayaklatthe/microsoft-security-skills.

Open the folder on GitHubat commit 15f16df

Compare with similar skills

Defender For Containers next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Defender For Containers compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Defender For Containers this skillvinayaklatthe/microsoft-security-skills175—~2.1kAutomated safety check: PassMIT
KubeShark for KubernetesLukasNiessen/kubernetes-skill446—~1.2kAutomated safety check: PassMIT
Alibabacloud Ecs Sec Userspacealiyun/alibabacloud-ecs-troubleshoot-skills148—~2.6kAutomated safety check: NotesApache-2.0
Performing Container Security Scanning With Trivymukul975/Anthropic-Cybersecurity-Skills34k—~818Automated safety check: PassApache-2.0
Kcli Cluster Deploymentkarmab/kcli653—~1.5kAutomated safety check: PassApache-2.0
Ama Logs Update Charts Release Notesmicrosoft/Docker-Provider174—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • KubeShark for Kubernetes

    LukasNiessen/kubernetes-skill

    Keeps Kubernetes manifests, Helm charts and policies grounded by diagnosing six failure modes, such as insecure defaults and API drift, and loading only matching references.

    446 GitHub stars~1.2k tokensUpdated 27 days ago
    DevOps & CloudAuto-check passed
  • Alibabacloud Ecs Sec Userspace

    aliyun/alibabacloud-ecs-troubleshoot-skills

    Linux 用户态安全入侵检测与取证工具,专为 AI Agent 设计。自动判断服务器是否被入侵, 提供完整证据链和可执行修复建议。51 个安全分析器覆盖进程/网络/认证/持久化/Rootkit/ 恶意软件/内存取证/容器逃逸等 12 类检测维度,10 个数据采集器全面采集系统状态, 映射 103+ MITRE ATT&CK 技术,支持 standalone/docker/k8s 三种部署模式。

    148 GitHub stars~2.6k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Performing Container Security Scanning With Trivy

    mukul975/Anthropic-Cybersecurity-Skills

    Runs Trivy across every target type it supports - container images, filesystems, Git repositories, and Kubernetes clusters - for OS and dependency vulnerabilities, IaC misconfiguration, exposed…

    34k GitHub stars~818 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Guides deployment and management of Kubernetes clusters with kcli.

    653 GitHub stars~1.5k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Ama Logs Update Charts Release Notes

    microsoft/Docker-Provider

    Official

    Prepare an ama-logs release PR: bump the image tag (X.Y.Z) across Helm charts, manifests, and Dockerfiles, and add a formatted ReleaseNotes.md entry.

    174 GitHub stars~2.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Cloud Audit

    CommonHuman-Lab/nyxstrike

    Cloud and container security auditing workflow using prowler, trivy, kube-hunter, and docker-bench for AWS, GCP, Azure, Kubernetes, and container images

    157 GitHub stars~1.1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed

More from vinayaklatthe/microsoft-security-skills

All 50 skills in this repo
  • API Security Design

    vinayaklatthe/microsoft-security-skills

    Guidance for designing secure APIs on Azure - authentication, authorization, gateway controls, input validation, rate limiting, secret management, and runtime threat detection - aligned to OWASP API…

    175 GitHub stars~2.2k tokensUpdated 3 mo ago
    Auto-check passed
  • Azure App Service Security

    vinayaklatthe/microsoft-security-skills

    Guidance for securing Azure App Service web apps and APIs — managed identity, Easy Auth with Microsoft Entra ID, network isolation via private endpoints + VNet integration, HTTPS / TLS hardening…

    175 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • Azure Arc

    vinayaklatthe/microsoft-security-skills

    Guidance for Azure Arc — projecting on-premises, multicloud (AWS/GCP), and edge servers, Kubernetes, and data services into Azure Resource Manager for unified governance, security, and management.

    175 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check passed
  • Azure Bastion Jit

    vinayaklatthe/microsoft-security-skills

    Guidance for secure remote VM management in Azure using Azure Bastion combined with Defender for Cloud just-in-time (JIT) VM access.

    175 GitHub stars~2.2k tokensUpdated 3 mo ago
    Auto-check passed
  • Azure Confidential Computing

    vinayaklatthe/microsoft-security-skills

    Guidance for Azure Confidential Computing — protecting data in use through hardware-based Trusted Execution Environments (TEEs).

    175 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Azure Ddos Protection

    vinayaklatthe/microsoft-security-skills

    Guidance for Azure DDoS Protection — Network Protection (per-VNet) and IP Protection (per public IP) tiers built on the same always-on Microsoft platform.

    175 GitHub stars~2k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Defender For Containers

What does Defender For Containers do?

Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift. Defender For Containers is an agent skill from vinayaklatthe/microsoft-security-skills. Guidance for Microsoft Defender for Containers — Kubernetes and container security across AKS, Azure Arc-enabled Kubernetes, EKS, GKE, and OpenShift.

When should I use Defender For Containers?

Defender For Containers fits situations like: VM/host hardening (use defender-for-servers); AKS networking design (use azure-network-security-design); general AKS day-2 ops unrelated to security.

How do I install Defender For Containers in Claude Code?

Run `npx skills add vinayaklatthe/microsoft-security-skills --skill defender-for-containers -a claude-code`. Or copy the skill folder (skills/defender-for-containers in vinayaklatthe/microsoft-security-skills) into .claude/skills/defender-for-containers in your project. Claude Code loads it when a task matches its description.

How do I install Defender For Containers in Codex?

Run `npx skills add vinayaklatthe/microsoft-security-skills --skill defender-for-containers -a codex`. Or copy the skill folder (skills/defender-for-containers in vinayaklatthe/microsoft-security-skills) into .agents/skills/defender-for-containers in your project. Codex loads it when a task matches its description.

Can I use Defender For Containers in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinayaklatthe/microsoft-security-skills --skill defender-for-containers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/defender-for-containers, .gemini/skills/defender-for-containers, .github/skills/defender-for-containers and .opencode/skills/defender-for-containers in your project.

What does Defender For Containers need to run?

Going by SKILL.md and its folder, Defender For Containers needs the command-line tools its instructions call (kubectl). Our summary lists: Docker.

Does Defender For Containers access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Defender For Containers safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Defender For Containers use?

Defender For Containers is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Defender For Containers use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Defender For Containers?

Skills that share tags, products or a category with Defender For Containers: KubeShark for Kubernetes (LukasNiessen/kubernetes-skill, 446 stars), Alibabacloud Ecs Sec Userspace (aliyun/alibabacloud-ecs-troubleshoot-skills, 148 stars), Performing Container Security Scanning With Trivy (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Kcli Cluster Deployment (karmab/kcli, 653 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Defender For Containers?

vinayaklatthe (a GitHub user) maintains it in vinayaklatthe/microsoft-security-skills, which has 175 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on June 18, 2026.

Source: vinayaklatthe/microsoft-security-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.