TL;DR: Container security testing has to join image, registry, Kubernetes and application checks, according to Invicti. For practitioners, the key issue is that build-time confidence does not prove runtime isolation or API safety.
Editorial analysis by NHI Mgmt Group, based on content published by Invicti: “Container security testing checklist: What to test from build to runtime”.
Key questions
Q: Why can a clean container image still be risky in Kubernetes?
A: A clean container image can still be risky because Kubernetes adds effective permissions through service accounts, RBAC, mounted secrets, network reachability, and pod security context settings.
Q: How should teams verify container image integrity?
A: Verify container image integrity by signing images, checking signatures before deployment, and pinning images by digest rather than by mutable tags.
Q: How do I test container security across build and runtime?
A: Test container security by scanning the image during build for known package and base-image flaws, checking the Dockerfile for unsafe settings, and validating the runtime with admission controls, least-privilege Linux capabilities, read-only filesystems, and seccomp or AppArmor profiles.
Practitioner guidance
- Verify effective workload permissions before deployment Review service accounts, RBAC bindings, pod security settings and host access together so a workload cannot gain more privilege in the cluster than it needs.
- Treat image signatures as evidence, not assurance Require digest pinning, signature verification and SBOM retention, then revalidate the image when vulnerability intelligence changes or a new build is promoted.
- Test network isolation with allow and deny cases Confirm that policies actually block unwanted ingress and egress, including DNS and dependency traffic, rather than assuming the manifest enforces isolation on its own.
Bottom line: Container security failures often begin after the build stage, when workload permissions, network reach and application exposure change the real risk.
Glossary terms: Container Security, Service Account, Kubernetes RBAC, SBOM
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Container testing is a governance chain, not a single control. Build scanning, registry review, deployment policy and runtime monitoring each answer a different question, and none of them is sufficient on its own. The practical mistake is to treat image vulnerability findings as the whole risk picture when permissions, connectivity and application exposure can change after build time. Teams need a control chain that follows the workload from source to execution.
A few things that frame the scale:
- 97% of NHIs carry excessive privileges, increasing unauthorised access and broadening the attack surface, according to the Ultimate Guide to NHIs.
- Red Hat’s Kubernetes Security Report found that nearly 9 in 10 organizations had at least 1 container or Kubernetes security incident in the last 12 months.
A question worth separating out:
Q: What is the best way to govern service account access for containers?
A: Govern service account access by assigning each container the smallest possible service account, binding it to narrowly scoped RBAC roles, and avoiding long-lived tokens or default accounts. Rotate credentials where possible, disable unused service accounts, and review which pods can mount secrets or call the API server.
👉 Read our full editorial: Container security testing must span runtime permissions and APIs