Home

Guide to Pragmatic Container Security

Episode 1: Runtime Security

Intro

If reinforced windows are our 'application security', and burglar alarms are our 'container monitoring', then runtime security would be never having bought anything worth stealing.

This is part #1 of the Guide to Pragmatic Container Security - today focussing on Runtime Security. In this post we’ll review the most common threats our container workloads face, and propose the 8 most-impacting controls you can implement to reduce the risk associated with compromised container workloads.

What Attackers Target

Our first step is understanding the types of attacks seen in the wild mounted from compromised container workloads:

With this in mind, we can now outline our threat-informed controls to mitigate these attacks.

The tl;dr, or 'Hurry it the Fuck Up Joe'

For those pretending to be in a rush, here’s the quick list of recommendations to maximise runtime security impact:

And with that facade of helpfulness out of the way, let’s take a gentle dip into impact-based container runtime security.

The l;r, or 'You are a Valued Engineer, Joe'

Control #1: Don’t run privileged containers:


Control #2: Use default SecComp security profile


Control #3: Use default AppArmor security profile


Control #4: Don’t add unnecessary capabilities


Control #5: Don’t run containers as root


Control #6: Don’t mount /var/run/docker.sock


Control #7: Don’t mount unnecessary host directories


Control #8: Use Docker content trust for pulling images


That’s a wrap

Thus marks the end of our foray into pragmatic container runtime security controls. Implementing these recommendations will mark a huge step in reducing the likelihood of container-mounted attacks in your environment, and will set the foundations to continue building effective and threat-driven container security controls into your organisation.

The end.