Container Security
Thin router for container and Kubernetes security assessments. Load the
reference, workflow, or payload file you need — do not read all of them.
When to Use
- Scanning Docker/OCI images for CVEs (single image or pipeline)
- Generating or attesting SBOMs (Syft / CycloneDX / SPDX)
- Diffing SBOMs across releases to flag newly-introduced CVEs
- Auditing a live Kubernetes cluster (CIS / NSA / MITRE)
- Mapping K8s RBAC and finding privilege-escalation paths
- Reviewing NetworkPolicy coverage
- Authoring Falco / Tetragon runtime rules
- Analyzing or testing container escape vectors (authorized only)
- Docker daemon / host hardening review
Trigger Phrases
"scan this image", "trivy / grype / syft", "audit k8s cluster",
"kube-bench", "kubescape", "run CIS benchmark", "check RBAC",
"networkpolicy coverage", "falco rule", "container escape",
"SBOM diff", "new CVEs since last release".
When NOT to Use This Skill
| Request |
Use instead |
| Static scan of K8s YAML / Helm / Kustomize before deploy |
iac-security |
| Terraform / CloudFormation / Pulumi misconfig |
iac-security |
| EKS / GKE / AKS control-plane or managed-service misconfig |
cloud-security |
| Cloud IAM misconfiguration (beyond K8s RBAC) |
cloud-security |
| Application-code vulns inside the container |
sast-orchestration |
| Third-party library CVEs at source-code level |
sca-security |
| API endpoints exposed by containerized services |
api-security |
Rule of thumb: pre-deployment YAML → iac-security; running cluster or
built image → this skill.
Decision Tree
Target?
|
|-- Built/registry image ----------> workflows/image_scan.md
| \-- two images to compare? --> workflows/sbom_diff.md (FLAGSHIP)
|
|-- Dockerfile source -------------> examples/vulnerable_dockerfile.md
| + hadolint (references/image_scanning.md)
|
|-- Live K8s cluster --------------> workflows/cluster_audit.md
| |-- RBAC deep-dive ----------> workflows/rbac_analysis.md
| |-- Network policy gap ------> workflows/network_policy_review.md
| \-- CIS benchmark only ------> references/kubernetes_hardening.md
|
|-- Runtime monitoring ------------> references/runtime_security.md
| + examples/falco_custom_rule.yaml
|
\-- Escape testing (authorized) --> references/container_escape.md
+ payloads/container_escape_poc.md
Parallelism Hints
Run concurrently (no shared state, no rate conflicts):
- Trivy + Grype + Syft + Hadolint on the same image — always parallel
- Scanners across multiple image tags — one sub-agent per tag
- kube-bench across nodes — deploy as DaemonSet, collect in parallel
- Kubescape frameworks (nsa, mitre, cis) — parallel invocations
- RBAC object fetches (
clusterroles, roles, bindings) — parallel
- SBOM diff Grype scans (prior vs current) — parallel
- Per-principal RBAC graph expansion — parallel (stateless)
Sequential only:
- Cosign attestation (needs SBOM first)
- Cross-scanner CVE consensus merge (needs all scanner outputs)
- Finding emission (needs evaluated data)
Sub-Agent Delegation
- Multi-image pipeline: spawn one sub-agent per image; each runs
workflows/image_scan.md and returns finding records. Parent merges.
- Multi-cluster environment: one sub-agent per cluster; each runs
workflows/cluster_audit.md with its own kubecontext.
- Cluster audit fan-out: parent runs inventory, then spawns sub-agents
for
rbac_analysis, network_policy_review, and runtime log triage in
parallel.
- SBOM diff per service: one sub-agent per service in a monorepo
release; parent aggregates the "newly-introduced CVEs" roll-up.
Reasoning Budget
| Task |
Budget |
| Running a scanner and capturing output |
Minimal |
| Applying CIS checks, filling checklists |
Minimal |
| SBOM canonicalization and package diff |
Minimal |
| Cross-scanner CVE consensus |
Moderate |
| RBAC privilege-graph traversal (principal -> cluster-admin) |
Extended |
| Container escape chain composition |
Extended |
| SBOM diff CVE exposure scoring + waiver decision |
Extended |
| Runtime alert triage (chaining Falco events to intent) |
Moderate |
Extended thinking pays off where the answer requires composing many small
facts into an attack path or risk decision; it does not help when running
a scanner and reporting output verbatim.
Multimodal Hooks
- Image layer histograms — attach Syft/Dive output screenshots to
evidence for bloat/secret-layer findings.
- RBAC graphs —
rbac-tool viz produces graphviz; render as PNG and
embed in report for stakeholder clarity.
- Falco/Tetragon alert screenshots — useful for runtime-detection
evidence bundles.
Structured Output
All findings MUST conform to schemas/finding.json.
Container-security-specific fields: affected.image_digest,
affected.image_tag, affected.cluster_name, affected.namespace,
affected.resource_kind, affected.service_account, cve, cvss,
fixed_version, cis_control, and the sbom_diff block for diff
findings.
Workflow Index
| Workflow |
Purpose |
workflows/image_scan.md |
Build-time / registry image vuln scan with consensus merge |
workflows/sbom_diff.md |
Flagship. Compare prior vs current SBOM; flag new CVEs |
workflows/cluster_audit.md |
Live K8s cluster assessment (CIS / NSA / MITRE) |
workflows/rbac_analysis.md |
RBAC privilege mapping and attack-path search |
workflows/network_policy_review.md |
NetworkPolicy coverage + enforcement validation |
Payloads Index
| Payload |
Purpose |
payloads/container_escape_poc.md |
Documented escape PoCs (authorized testing only) |
References Index
| Reference |
Purpose |
references/image_scanning.md |
Trivy, Grype, Syft, Clair, Snyk, Hadolint commands |
references/kubernetes_hardening.md |
kube-bench, Kubescape, CIS K8s mapping, PSS |
references/container_escape.md |
Escape vectors, capabilities, runtime CVEs |
references/runtime_security.md |
Falco, Tetragon, eBPF, rule authoring |
references/bounty_patterns_2024_2026.md |
Post-2023 bounty TTPs (CVE-2024-21626 runC, CVE-2025-23266 NVIDIA, SA token theft, RoleBinding privesc) |
Examples Index
| Example |
Purpose |
examples/falco_custom_rule.yaml |
Ready-to-load Falco rule pack |
examples/vulnerable_dockerfile.md |
Common Dockerfile anti-patterns + fixes |
Templates Index
| Template |
Purpose |
templates/assessment_report_template.md |
End-of-engagement deliverable skeleton |
Tools
| Tool |
Purpose |
Install |
| Trivy |
Image / FS vuln + SBOM + IaC |
brew install trivy |
| Grype |
Image / SBOM vuln |
brew install grype |
| Syft |
SBOM generator |
brew install syft |
| Hadolint |
Dockerfile lint |
brew install hadolint |
| Kubescape |
K8s security platform |
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash |
| kube-bench |
CIS K8s benchmark |
brew install kube-bench |
| kube-hunter |
K8s pentest recon |
pip install kube-hunter |
| Falco |
Runtime security (eBPF) |
Helm chart falcosecurity/falco |
| Tetragon |
eBPF detection + enforcement |
Helm chart cilium/tetragon |
| Docker Bench |
Docker CIS benchmark |
git clone https://github.com/docker/docker-bench-security.git |
| Cosign |
Sign / attest images + SBOMs |
brew install cosign |
| Crane |
Registry ops (resolve digest) |
brew install crane |
| rbac-tool |
RBAC graph visualization |
brew install insights-engineering/tap/rbac-tool |
Last Validated
2026-04. Minimum tool versions: Trivy 0.59, Grype 0.87, Syft 1.18,
Kubescape 3.0, kube-bench 0.10 (CIS K8s v1.9), Falco 0.38, Tetragon 1.2,
Hadolint 2.12, Cosign 2.4.
1---2name: container-security3description: Container and Kubernetes security assessment — image vulnerability scanning, SBOM diff analysis, K8s cluster auditing, RBAC privilege mapping, NetworkPolicy review, container escape testing, and runtime monitoring (Falco/Tetragon). Use when scanning Docker/OCI images, auditing K8s clusters, reviewing Dockerfiles, diffing SBOMs across releases, analyzing RBAC, or assessing container runtime posture. Triggers on requests involving Trivy, Grype, Syft, Kubescape, kube-bench, Falco, container escapes, or CIS Docker/K8s benchmarks.4---56# Container Security78Thin router for container and Kubernetes security assessments. Load the9reference, workflow, or payload file you need — do not read all of them.1011## When to Use1213- Scanning Docker/OCI images for CVEs (single image or pipeline)14- Generating or attesting SBOMs (Syft / CycloneDX / SPDX)15- **Diffing SBOMs across releases to flag newly-introduced CVEs**16- Auditing a live Kubernetes cluster (CIS / NSA / MITRE)17- Mapping K8s RBAC and finding privilege-escalation paths18- Reviewing NetworkPolicy coverage19- Authoring Falco / Tetragon runtime rules20- Analyzing or testing container escape vectors (authorized only)21- Docker daemon / host hardening review2223## Trigger Phrases2425"scan this image", "trivy / grype / syft", "audit k8s cluster",26"kube-bench", "kubescape", "run CIS benchmark", "check RBAC",27"networkpolicy coverage", "falco rule", "container escape",28"SBOM diff", "new CVEs since last release".2930## When NOT to Use This Skill3132| Request | Use instead |33|-----------------------------------------------------------------|-------------------|34| Static scan of K8s YAML / Helm / Kustomize **before deploy** | `iac-security` |35| Terraform / CloudFormation / Pulumi misconfig | `iac-security` |36| EKS / GKE / AKS control-plane or managed-service misconfig | `cloud-security` |37| Cloud IAM misconfiguration (beyond K8s RBAC) | `cloud-security` |38| Application-code vulns inside the container | `sast-orchestration` |39| Third-party library CVEs at source-code level | `sca-security` |40| API endpoints exposed by containerized services | `api-security` |4142Rule of thumb: **pre-deployment YAML → iac-security; running cluster or43built image → this skill.**4445## Decision Tree4647```48Target?49|50|-- Built/registry image ----------> workflows/image_scan.md51| \-- two images to compare? --> workflows/sbom_diff.md (FLAGSHIP)52|53|-- Dockerfile source -------------> examples/vulnerable_dockerfile.md54| + hadolint (references/image_scanning.md)55|56|-- Live K8s cluster --------------> workflows/cluster_audit.md57| |-- RBAC deep-dive ----------> workflows/rbac_analysis.md58| |-- Network policy gap ------> workflows/network_policy_review.md59| \-- CIS benchmark only ------> references/kubernetes_hardening.md60|61|-- Runtime monitoring ------------> references/runtime_security.md62| + examples/falco_custom_rule.yaml63|64\-- Escape testing (authorized) --> references/container_escape.md65 + payloads/container_escape_poc.md66```6768## Parallelism Hints6970Run concurrently (no shared state, no rate conflicts):7172- **Trivy + Grype + Syft + Hadolint on the same image** — always parallel73- **Scanners across multiple image tags** — one sub-agent per tag74- **kube-bench across nodes** — deploy as DaemonSet, collect in parallel75- **Kubescape frameworks** (nsa, mitre, cis) — parallel invocations76- **RBAC object fetches** (`clusterroles`, `roles`, bindings) — parallel77- **SBOM diff Grype scans** (prior vs current) — parallel78- **Per-principal RBAC graph expansion** — parallel (stateless)7980Sequential only:8182- Cosign attestation (needs SBOM first)83- Cross-scanner CVE consensus merge (needs all scanner outputs)84- Finding emission (needs evaluated data)8586## Sub-Agent Delegation8788- **Multi-image pipeline**: spawn one sub-agent per image; each runs89 `workflows/image_scan.md` and returns finding records. Parent merges.90- **Multi-cluster environment**: one sub-agent per cluster; each runs91 `workflows/cluster_audit.md` with its own kubecontext.92- **Cluster audit fan-out**: parent runs inventory, then spawns sub-agents93 for `rbac_analysis`, `network_policy_review`, and runtime log triage in94 parallel.95- **SBOM diff per service**: one sub-agent per service in a monorepo96 release; parent aggregates the "newly-introduced CVEs" roll-up.9798## Reasoning Budget99100| Task | Budget |101|---------------------------------------------------------|---------------------|102| Running a scanner and capturing output | Minimal |103| Applying CIS checks, filling checklists | Minimal |104| SBOM canonicalization and package diff | Minimal |105| Cross-scanner CVE consensus | Moderate |106| RBAC privilege-graph traversal (principal -> cluster-admin) | **Extended** |107| Container escape chain composition | **Extended** |108| SBOM diff CVE exposure scoring + waiver decision | **Extended** |109| Runtime alert triage (chaining Falco events to intent) | Moderate |110111Extended thinking pays off where the answer requires composing many small112facts into an attack path or risk decision; it does not help when running113a scanner and reporting output verbatim.114115## Multimodal Hooks116117- **Image layer histograms** — attach Syft/Dive output screenshots to118 evidence for bloat/secret-layer findings.119- **RBAC graphs** — `rbac-tool viz` produces graphviz; render as PNG and120 embed in report for stakeholder clarity.121- **Falco/Tetragon alert screenshots** — useful for runtime-detection122 evidence bundles.123124## Structured Output125126All findings MUST conform to [`schemas/finding.json`](schemas/finding.json).127128Container-security-specific fields: `affected.image_digest`,129`affected.image_tag`, `affected.cluster_name`, `affected.namespace`,130`affected.resource_kind`, `affected.service_account`, `cve`, `cvss`,131`fixed_version`, `cis_control`, and the `sbom_diff` block for diff132findings.133134## Workflow Index135136| Workflow | Purpose |137|------------------------------------------------------------|---------|138| [`workflows/image_scan.md`](workflows/image_scan.md) | Build-time / registry image vuln scan with consensus merge |139| [`workflows/sbom_diff.md`](workflows/sbom_diff.md) | **Flagship.** Compare prior vs current SBOM; flag new CVEs |140| [`workflows/cluster_audit.md`](workflows/cluster_audit.md) | Live K8s cluster assessment (CIS / NSA / MITRE) |141| [`workflows/rbac_analysis.md`](workflows/rbac_analysis.md) | RBAC privilege mapping and attack-path search |142| [`workflows/network_policy_review.md`](workflows/network_policy_review.md) | NetworkPolicy coverage + enforcement validation |143144## Payloads Index145146| Payload | Purpose |147|---------------------------------------------------------------------------|---------|148| [`payloads/container_escape_poc.md`](payloads/container_escape_poc.md) | Documented escape PoCs (authorized testing only) |149150## References Index151152| Reference | Purpose |153|-------------------------------------------------------------------------------|---------|154| [`references/image_scanning.md`](references/image_scanning.md) | Trivy, Grype, Syft, Clair, Snyk, Hadolint commands |155| [`references/kubernetes_hardening.md`](references/kubernetes_hardening.md) | kube-bench, Kubescape, CIS K8s mapping, PSS |156| [`references/container_escape.md`](references/container_escape.md) | Escape vectors, capabilities, runtime CVEs |157| [`references/runtime_security.md`](references/runtime_security.md) | Falco, Tetragon, eBPF, rule authoring |158| [`references/bounty_patterns_2024_2026.md`](references/bounty_patterns_2024_2026.md) | Post-2023 bounty TTPs (CVE-2024-21626 runC, CVE-2025-23266 NVIDIA, SA token theft, RoleBinding privesc) |159160## Examples Index161162| Example | Purpose |163|----------------------------------------------------------------------------------|---------|164| [`examples/falco_custom_rule.yaml`](examples/falco_custom_rule.yaml) | Ready-to-load Falco rule pack |165| [`examples/vulnerable_dockerfile.md`](examples/vulnerable_dockerfile.md) | Common Dockerfile anti-patterns + fixes |166167## Templates Index168169| Template | Purpose |170|------------------------------------------------------------------------------------------------------------|---------|171| [`templates/assessment_report_template.md`](templates/assessment_report_template.md) | End-of-engagement deliverable skeleton |172173## Tools174175| Tool | Purpose | Install |176|--------------|-------------------------------|-----------------------------------------------|177| Trivy | Image / FS vuln + SBOM + IaC | `brew install trivy` |178| Grype | Image / SBOM vuln | `brew install grype` |179| Syft | SBOM generator | `brew install syft` |180| Hadolint | Dockerfile lint | `brew install hadolint` |181| Kubescape | K8s security platform | `curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh \| /bin/bash` |182| kube-bench | CIS K8s benchmark | `brew install kube-bench` |183| kube-hunter | K8s pentest recon | `pip install kube-hunter` |184| Falco | Runtime security (eBPF) | Helm chart `falcosecurity/falco` |185| Tetragon | eBPF detection + enforcement | Helm chart `cilium/tetragon` |186| Docker Bench | Docker CIS benchmark | `git clone https://github.com/docker/docker-bench-security.git` |187| Cosign | Sign / attest images + SBOMs | `brew install cosign` |188| Crane | Registry ops (resolve digest) | `brew install crane` |189| rbac-tool | RBAC graph visualization | `brew install insights-engineering/tap/rbac-tool` |190191## Last Validated1921932026-04. Minimum tool versions: Trivy 0.59, Grype 0.87, Syft 1.18,194Kubescape 3.0, kube-bench 0.10 (CIS K8s v1.9), Falco 0.38, Tetragon 1.2,195Hadolint 2.12, Cosign 2.4.