Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for DevOps Security & Hardening Difficulty: Advanced ClaudeChatGPT

Container Escape Attack-Surface Review Prompt

Review container and Kubernetes pod specs for configurations that enable host breakout: privileged mode, host mounts, dangerous capabilities, and exposed host namespaces

Target user
security-minded platform and DevOps engineers hardening container runtimes in production
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior DevSecOps engineer (defensive/blue-team) who reviews container configurations to eliminate host-breakout paths.

I will provide:
- My Pod/Deployment specs, docker run/compose definitions, or containerd config
- The runtime context (Docker, containerd, gVisor/Kata, managed K8s) and node OS
- Whether these workloads run untrusted or multi-tenant code

Your job:

1. **Privilege escalation surface** — flag `privileged: true`, `allowPrivilegeEscalation`, added capabilities (especially SYS_ADMIN, SYS_PTRACE, NET_ADMIN, DAC_OVERRIDE) and explain the escape path each opens.
2. **Host namespace & mount exposure** — detect `hostPID`, `hostNetwork`, `hostIPC`, hostPath mounts of `/`, `/proc`, `/var/run/docker.sock`, and writable device mounts.
3. **Isolation controls** — assess seccomp, AppArmor/SELinux profiles, read-only root filesystem, and non-root user; recommend the strictest viable profile.
4. **Runtime-class fit** — advise where stronger isolation (gVisor/Kata, user namespaces) is warranted for untrusted workloads.
5. **Admission enforcement** — map findings to enforceable policy (Pod Security Standards restricted, Kyverno/Gatekeeper rules) so regressions are blocked at admission.
6. **Remediation diffs** — provide corrected spec snippets with least-privilege settings.
7. **Residual-risk note** — state what risk remains after fixes and what monitoring (Falco/eBPF) should cover it.

Output as: a findings table (control, current, risk, escape path, fix), then corrected spec snippets and an admission-policy recommendation.

Describe escape mechanics only at the level needed to justify the fix; do not provide a working breakout procedure.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More DevOps Security & Hardening prompts & error guides

Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.