Build Security into Container Deployment

Qualys

By Hari Srinivasan, Director of Product Management, Qualys

Container adoption has skyrocketed, and with it the importance of securing the applications that DevOps teams create and deploy using this method of OS virtualization.

The protection that security teams provide must be comprehensive across the container lifecycle, and built seamlessly and unobtrusively into the DevOps pipeline.

Accomplishing this requires understanding Docker container technology, and adopting processes and tools tailored for these environments.

Container security challenges

Containers qualities that developers find attractive, such as packaging an application and its dependencies without a guest OS, also create create security and compliance issues.

These challenges include developers' use of software from public repositories, which often has vulnerabilities, and their deployment of weakly-configured containers.

In addition, containers communicate directly with each other via exposed network portsĀ  bypassing host controls, and their ephemeral nature makes them hard to track.

Protecting the container pipeline

All phases of container deployment have to be secured — build, ship and runtime. Let's look at them in detail.

Build

In this phase, the goal is blocking vulnerable images from your organization's repositories, especially images pulled from a public repository.

To keep unsafe images out, you should leverage REST APIs or native plug-ins, so that security checks can automatically run within your DevOps team's CI/CD tools.

These integrations will also let security teams give developers access to security tools. That way, developers can perform security functions from CI/CD tools without involving security teams.

Ship

In this phase, you should make sure that images in your repositories are checked for vulnerabilities. Registries and repositories should be inventoried. As images are added, scan them for vulnerabilities.

Also check that your organization's images come from reputable sources that keep images current and scrubbed of vulnerabilities. Using notary services can help ensure only trusted images are used in your environment.

Runtime

With the container images now on your registry and available for production use, it's critical to have visibility and continuous monitoring of runtime environments, as well as the ability to prevent and respond to breaches.

Security teams must detect rogue, vulnerable containers, identify where they are, and assess their potential impact based on how widespread they are in your environment.

A key here is to flag containers already running on the system that are breaking off from the "immutable" behavior of their parent image, which could indicate a breach.

After identifying rogue containers, your security tool should allow you to enforce counter measures of blocking or quarantining, and to drill down into anomalies' details.

An even better option: Automatically validate the image against security policies using your tool, and block unapproved images from being spun up as containers. Here you can leverage orchestrators like Kubernetes to prevent rogue containers from entering the environment via admission controllers.

Summary

We hope this article has helped you better understand the particular security challenges of containers, and how to address them throughout their lifecycle.

Sustaining Partners