Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
Container security means keeping the app's container and its running platform safe. A container bundles an app with the parts it needs so that it runs the same way anywhere. NIST SP 800-190 describes it as a combination of operating-system virtualization and app packaging, and sets out the security challenges and how to address them.
How does container security work?
It is like packing goods into a shipping container. If the contents are the same, any port can open it the same way. But if the ship or the port equipment is damaged, the cargo is at risk too.
What you protect divides into three layers: the contents of the container (the image), the base that runs it (the host and Docker), and the configuration. The OWASP Docker Security Cheat Sheet states that containers share the host's kernel, so a hole in the host kernel affects the containers. Its first rule is to keep the host and Docker up to date.
The same document names running a container as a low-privilege user as the best way to prevent privilege escalation. It also says not to expose the Docker daemon socket.
Inspection of the contents is done by container image scanning. If you want a view from outside before talking to a contractor, the free URL check is a quick first step.
Why does container security matter?
Containers are updated and deployed quickly, and the same container is copied into many places. If one image keeps an old part, that hole is copied too. The OWASP document also lists building image inspection into the automated flow from development to release (CI/CD).
Even if you do not run containers yourself, a production company or cloud contractor may. Ask whether they are used and who handles updates.
Related terms
- Container image scanning: an inspection that looks for holes in the parts inside a container
- Least privilege: granting only the range that is needed
- DevSecOps: building security in from the start of development through operation
- Vulnerable dependencies: a state where a part you use has a known hole
Frequently asked questions
Are containers safer than virtual machines?
Not necessarily. OWASP notes that containers share the host's kernel, so a hole in the host kernel can affect the containers as well. Keeping the host updated and narrowing privileges comes first.
What if I do not know whether we use containers?
Ask your production company or cloud contractor whether containers are in use, and who updates and scans the images. If they are, ask for the owner and the frequency in writing.
Next step
First confirm whether containers are used at all and who updates the host. If you would like help with that review, contact us.
Frequently asked questions
Are containers safer than virtual machines?
Not necessarily. OWASP notes that containers share the host's kernel, so a hole in the host kernel can affect the containers as well. Keeping the host updated and narrowing privileges comes first.
What if I do not know whether we use containers?
Ask your production company or cloud contractor whether containers are in use, and who updates and scans the images. If they are, ask for the owner and the frequency in writing.