Container Security Testing

Container and Kubernetes Security Testing

Scanning an image tells you which packages inside it have known vulnerabilities. It says nothing about whether a compromised pod can reach your database, read another namespace's secrets, or escalate to the node. Penetrify tests the running system, on every deploy.

In short

Container security testing assesses a running containerised workload: image contents, build and registry trust, runtime configuration, and what an attacker can reach after compromising one container. Image scanning covers only the first of those four.

What image scanning covers
Known vulnerable packages and unsafe build practices inside an image
What it misses
Runtime privileges, network reachability, secrets exposure, escalation paths
Time to first findings
Minutes
Entry price
From $100/month
Cluster access required
No: application-layer testing runs from outside
Destructive testing
Never: no pod deletion, no resource exhaustion

What gets tested

Test scope, by attack surface

Image and supply chain

  • Known vulnerable OS and language packages in the image layers
  • Secrets committed into layers: keys, tokens, kubeconfig fragments, .env files
  • Base image currency and provenance, and whether tags are pinned to digests
  • Build-time tooling left in the final image (compilers, package managers, debug shells)
  • Registry trust: unsigned images, mutable tags, missing admission controls

Runtime configuration

  • Containers running as root, or with unnecessary Linux capabilities
  • Privileged pods, host namespace sharing (PID, network, IPC), hostPath mounts
  • Missing or permissive security contexts, seccomp and AppArmor profiles absent
  • Resource limits unset, allowing one workload to starve a node
  • Automounted service account tokens where the workload needs no API access

Kubernetes access control

  • RBAC roles broader than the workload requires, including wildcard verbs and resources
  • Service accounts able to read secrets across namespaces
  • Paths from a pod service account to cluster-admin
  • Namespace isolation: whether a compromised workload can reach another tenant's services
  • Exposed dashboards, kubelet endpoints and metrics services

Network and reachability

  • Absent NetworkPolicies, so any pod can reach any pod
  • Internal services reachable from workloads that should not see them
  • Cloud metadata endpoint reachable from pods (the path to node credentials)
  • Egress unrestricted, enabling data exfiltration and command-and-control
  • Ingress and service exposure that publishes an internal service by accident

Application layer inside the cluster

  • The same authorisation, injection and business-logic testing the workload needs regardless of packaging
  • Service-to-service calls that trust an internal caller without verifying identity
  • Secrets read from environment variables and leaked through error output or logs
  • Sidecar and init container behaviour that widens the trust boundary

Not in scope

Denial of service, resource exhaustion or deliberate node pressureDestructive actions: deleting workloads, draining nodes, corrupting persistent volumesPhysical or hypervisor-level attacks against the underlying infrastructureEscaping to a managed control plane you do not own (that is your provider's boundary)Testing clusters you are not authorised to touch

Methodology

How the test runs, step by step

01

Map what is actually running

Inventory images, workloads, namespaces, service accounts and exposed services. The gap between what a team believes runs and what runs is where most findings live: an old deployment nobody scaled down, a debug service exposed for an afternoon in March.

Workload and exposure inventory
02

Assess images and provenance

Vulnerable packages, embedded secrets, build residue, base image age, tag mutability and signing. This is the part conventional scanners do, and it is included rather than the whole engagement.

Image findings with layer attribution
03

Test runtime posture

Security contexts, capabilities, host namespace sharing, mounts, resource limits and token automounting, checked against what each workload genuinely needs rather than a generic baseline.

Runtime misconfiguration findings
04

Attempt the escalation chain

From the position of one compromised container: what can this service account read, which pods can it reach, is the metadata endpoint available, does any path lead to node or cluster-admin. Findings are chained into the sequence an attacker would use.

Attack chains with blast radius
05

Report and retest

Findings with severity, reproduction, the manifest or policy that causes them, and the fix. Rerun after each change; retesting is part of the subscription, so verifying a hardened NetworkPolicy costs nothing extra.

Report, evidence, retest on demand

Straight answers

What buyers actually ask

We already scan our images. What are we missing?

Everything that depends on how the container runs rather than what is inside it. An image with zero known vulnerabilities, running as root with a hostPath mount and an automounted token that can read secrets cluster-wide, is a serious finding that no image scanner will report — because nothing in the image is wrong.

The categories image scanning cannot see: privilege and capability configuration, network reachability between workloads, RBAC paths to cluster-admin, cloud metadata exposure, and the application flaws inside the workload. Those are also the ones that turn one compromised pod into an incident.

Do you need access to our cluster?

For application-layer testing, no: we test the exposed workload the way an attacker would, from outside. That covers the authorisation, injection and business-logic classes that matter most and needs nothing but a URL and credentials.

For runtime posture and RBAC analysis, we need read access — a scoped service account with read-only permissions, or exported manifests and RBAC policies if you prefer not to grant access at all. We never require write access, and no test deletes or restarts anything.

How does this fit with Kubernetes we do not manage ourselves?

Managed control planes (EKS, GKE, AKS) move part of the boundary to your provider, and testing respects that: we do not attempt to escape into a control plane you do not own. What remains yours is the larger half — workload configuration, RBAC, network policy, secrets handling and the applications themselves.

In practice most findings in managed clusters are in exactly that half, because the provider hardens the control plane and the defaults for everything else are permissive.

What does container security testing cost?

A manual cluster review from a consultancy is typically a five-figure engagement, priced by consultant days, and gives you a point-in-time report. Image scanning is often bundled into your registry or CI provider at little or no extra cost, and covers only images.

Penetrify runs continuously from $100 a month with retests included, which is the model that matches how clusters change — a NetworkPolicy edited on Tuesday is tested on Tuesday. For a compliance-driven annual review, keep one human engagement and use continuous testing for the other fifty-one weeks.

Comparison

Four ways to get a web app tested

Image scannerCSPM / posture toolManual cluster reviewPenetrify
Vulnerable packages in imagesYesPartialSampledYes
Embedded secrets in layersOftenPartialYesYes
Runtime privilege reviewNoYesYesYes
RBAC escalation pathsNoFlags policiesYesYes, attempted
Network reachability between podsNoPolicy viewYesYes, tested
Application flaws in the workloadNoNoDepends on testerYes
Chained attack pathsNoRarelyYesYes
FrequencyEvery buildContinuousOnce or twice a yearEvery deploy
CostLow, often bundledPlatform pricingFive figures per engagementFrom $100/month

Common findings

What these tests keep finding

CRITICALPod service account can read secrets in other namespaces, giving one compromised workload the whole cluster
CRITICALCloud metadata endpoint reachable from pods, exposing node credentials and a path out of the cluster
HIGHContainer runs privileged or with host namespace sharing, removing the isolation boundary entirely
HIGHNo NetworkPolicies, so any compromised pod can reach every internal service including the database
HIGHLong-lived cloud or registry credentials committed into an image layer
MEDIUMRBAC role uses wildcard verbs and resources far beyond what the workload calls
MEDIUMService account token automounted into workloads that never call the Kubernetes API
MEDIUMBase image years out of date, or referenced by a mutable tag rather than a digest
LOWResource limits unset, allowing a single workload to degrade the node

Real teardowns of findings like these, with the request that proved them: read the case studies.

Deliverables

What you get

Findings report

Each finding with severity, the manifest, policy or layer that causes it, reproduction steps, and the specific change that fixes it.

Escalation chains

The path from one compromised container to something that matters, documented end to end rather than as unrelated tickets.

Blast radius per workload

What a given pod can reach today: which services, which secrets, which namespaces. The input to a NetworkPolicy or RBAC decision.

Retest history

What closed, what regressed and when — the evidence auditors and enterprise reviewers ask for.

Compliance

Frameworks that expect penetration testing

SOC 2 Type II

CC6.1: logical access controls, which in a cluster means RBAC and network segmentation evidence

ISO 27001

A.12.6: technical vulnerability management including the container supply chain

PCI DSS 4.0

Requirement 11.4.1 pentest methodology; segmentation testing where containers sit in or beside the cardholder data environment

HIPAA Security Rule

45 CFR §164.308(a)(8): evaluation of technical safeguards, including workloads processing ePHI

NIST SP 800-190

Container security guidance: image, registry, orchestrator, runtime and host layers

FAQ

Container Security Testing questions

Is container security testing the same as image scanning?

No. Image scanning inspects what is inside an image — packages, secrets, build residue. Container security testing assesses the running system: privileges, network reachability, RBAC, secrets handling and the application itself. Image scanning is one of five layers, and it is the cheapest one.

Can you test a Kubernetes cluster without cluster access?

Application-layer testing needs no access at all: exposed workloads are tested from outside. Runtime posture and RBAC analysis need read-only access, or exported manifests if you would rather not grant a service account.

Will testing disrupt our workloads?

No. Nothing is deleted, drained or restarted, and denial-of-service and resource-exhaustion testing are explicitly out of scope. Many teams still start against a staging cluster and move to production once they have seen the request volume.

What about managed Kubernetes on EKS, GKE or AKS?

The control plane is your provider's responsibility and we do not attempt to escape into it. Everything else — workload configuration, RBAC, network policy, secrets, applications — remains yours, and that is where the findings concentrate because provider defaults are permissive.

Do you test container registries and the build pipeline?

Yes, as part of supply chain scope: unsigned images, mutable tags, missing admission control, and secrets or build tooling left in final layers. Pipeline credential handling is covered in CI/CD testing.

Get started

Test your web application today

No scoping call, no statement of work, no testing window to wait for. Add a URL and credentials, and the first findings land in minutes.