// developer security

What Is Container Security?

Container security covers the image, the runtime, and the orchestration layer — not just the application code inside. Here's what it actually involves.

3 min readAverto

Containers changed how applications get built and deployed, and they introduced a set of security concerns that don't map cleanly onto traditional application security thinking. Container security isn't just "application security, but in a container" — it covers several distinct layers, most of which have nothing to do with your application code directly.

The layers of container security

The base image

Every container starts from a base image, which itself may contain outdated packages, unnecessary tools, or known vulnerabilities. An application built on a vulnerable or bloated base image inherits that risk regardless of how secure the application code itself is.

The application layer

The code and dependencies running inside the container — this overlaps with standard application security concerns like dependency scanning and secure coding practices, just packaged differently.

The container runtime

How the container is configured to run — whether it runs as root, what capabilities it's granted, whether it can access the host filesystem or network in ways it shouldn't. Misconfiguration here can allow a compromised container to escalate beyond its intended boundaries.

The orchestration layer

For containers managed by Kubernetes or similar orchestration platforms, the orchestration configuration itself is a security surface — role-based access control, network policies, secrets management, and API server exposure all matter independently of anything happening inside individual containers.

The registry

Where container images are stored and pulled from. An insecure or publicly writable registry can allow a malicious image to be substituted for a legitimate one.

Common container security issues

  • Outdated or bloated base images carrying known vulnerabilities and unnecessary attack surface
  • Containers running as root unnecessarily, increasing the impact of a container-level compromise
  • Secrets baked into images rather than injected at runtime, making them recoverable by anyone who can pull the image
  • Overly permissive orchestration configuration — broad RBAC permissions, permissive network policies
  • Exposed container management interfaces, such as an unauthenticated Docker daemon or Kubernetes API server reachable from the internet
  • Missing resource limits, which can turn a single compromised or misbehaving container into a denial-of-service condition for the whole host

How to actually secure containers

  1. Use minimal base images — smaller images mean less software, which means fewer potential vulnerabilities and a smaller attack surface
  2. Scan images continuously, not just at build time — a base image that was clean when built can have newly disclosed vulnerabilities discovered later
  3. Avoid running containers as root unless there's a specific, justified reason
  4. Inject secrets at runtime, using orchestration-native secrets management, rather than embedding them in the image itself
  5. Apply least-privilege orchestration configuration — scope RBAC roles and network policies tightly rather than granting broad default access
  6. Keep the registry access-controlled, and verify image provenance where possible rather than pulling unverified images

Container security is continuous, not a build-time check

An image scanned as clean at build time doesn't stay clean — new vulnerabilities get disclosed in base image packages on an ongoing basis, independent of anything your team changes. Continuous rescanning of images already in use, not just newly built ones, is necessary to catch this.

How does Averto fit in?

Container and infrastructure-layer risk is part of the same continuous testing approach Averto applies to the application itself — scanning images and configuration on an ongoing basis, so newly disclosed vulnerabilities in base images or misconfigurations in orchestration don't go unnoticed between periodic reviews.

Frequently asked questions

Is container security different from application security?

It overlaps significantly but adds layers — base image, runtime configuration and orchestration — that don't exist outside of containerized environments.

Do I need to scan container images if I already scan my application dependencies?

Yes — image scanning covers OS-level packages and the base image itself, which application-level dependency scanning typically doesn't cover.

Should containers run as root?

Generally no, unless there's a specific justified need — running as a non-root user limits the impact of a container-level compromise.

How often should container images be rescanned?

Continuously or on a regular schedule — new vulnerabilities in base image packages are disclosed independent of when the image was last built.

← All articles

// put it into practice

Scan your own application.

Averto tests your websites, web apps, code, dependencies, containers, configuration and secrets in one place, and explains every finding in plain English.