Container security best practices
Here are a few general security best practices when using containers for your application development process. We will look at these in three parts: the build phase, the distribution/deployment phase, and the production/run phase. These go hand in hand with your CI/CD security:
- Security in the container build phase: This is where the container build starts:
- Source image control: In this phase, you write the code to create a container. Follow these best practices for this phase:
- Avoid retrieving/using source images with unknown/untrusted publishers.
- If a third-party image is used, it is strongly recommended to identify and document detailed information, such as the version/build of code included and information about the creator of the image.
- Never include code from unverified/untrusted sources in an image.
- Use digital signature/checksum verification services on images whenever possible.
- Prior to completing image creation, all dependencies and libraries...
- Source image control: In this phase, you write the code to create a container. Follow these best practices for this phase: