SlideShare a Scribd company logo
SecDevops Containers
SecDevops Containers
● @jmortegac
● http://jmortega.github.io
● https://www.linkedin.com/in/jmortega1/
SecDevops Containers
https://bpbonline.com/products/devops-and-containers-security-
security-and-monitoring-in-docker-containers
● Introduction
● Containers Security
● SecDevops tools
● DevOps security best practices
SecDevops Containers
SecDevops Containers
SecDevops Containers
SecDevops Containers
● Increased speed and agility for security
teams.
● Increased or better collaboration and
communication across teams.
● Increased opportunities for automated builds
and quality assurance testing.
● Early identification of vulnerabilities in
application code.
● 1. Containers are NOT Virtual Machines
● 2. Containers are isolated area in the OS kernel
● 3. Kubernetes is a Container Orchestration Platform.
● 4. Kubernetes abstracts the cloud vendor (AWS,Azure,
GCP) scalability features.
SecDevops Containers
● Build Small Container Images
○ Use Alpine Image as your base Linux OS
○ Using distroless images
○ Smaller image size reduce the Container
vulnerabilities.
SecDevops Containers
● Distroless Images
○ https://github.com/GoogleCloudPlatform/distroless
SecDevops Containers
● Containers inmutability
○ Container images follow a unix philosophy
○ Container images should be immutable
○ RUN rm /usr/bin/apt-* /usr/bin/dpkg*
SecDevops Containers
● Avoid root user
○ Create a User account
○ Add Runtime software’s based on the User Account.
○ Run the App under the user account
○ Add Security module SELinux or AppArmour to
increase the security
SecDevops Containers
● Container Security
○ Secure your HOST OS. Containers runs on Host
Kernel.
○ No Runtime software downloads inside the container.
○ Declare the software requirements at the build time
itself.
○ Download Docker base images from Authentic site.
○ Limit the resource utilization using Container
orchestrators like Kubernetes.
○ Don’t run anything on Super privileged mode.
SecDevops Containers
● Docker hub
○ Do you have your own container registry?
○ Do you check your Dockerfiles?
○ Your pipelines has permissions and access to publish
in docker hub?
○ Do you inspect your Dockerfiles?
○ Do you have Docker builds correctly configured?
○ Do you control where layers are built?
SecDevops Containers
● Docker Content Trust
○ https://docs.docker.com/engine/security/trust/
content_trust/
○ export DOCKER_CONTENT_TRUST =1
○ Protection of malicious code in images.
○ Protection against repeated attacks.
○ Protection against key commitments.
SecDevops Containers
● Exploring layers in docker images
○ https://github.com/wagoodman/dive
SecDevops Containers
● Container introspection tool
○ https://github.com/genuinetools/amicontained
SecDevops Containers
● Docker bench security
○ https://github.com/docker/docker-bench-security
SecDevops Containers
SecDevops Containers
SecDevops Containers
SecDevops Containers
SecDevops Containers
● Kubernetes Security
○ Preventing image manipulation and unauthorized
access
○ Deploying Pods without root permissions
○ Pod Security Policies
○ Secrets management
SecDevops Containers
● Pods Security
○ Never access a Pod directly from another Pod.
○ Never use :latest tag in the image in the
production scenario.
SecDevops Containers
● Namespaces
○ Group your services/pods traffic rules based on
specific namespace.
○ Handle specific Resource Allocations for a
Namespace.
○ If you have more than a dozen Microservices then it’s
time to bring in Namespaces.
SecDevops Containers
● Using official images
○ Use images provided by a vendor
○ Critical vulnerabilities are resolved automatically when
they are updated.
SecDevops Containers
● https://kubesec.io/
SecDevops Containers
SecDevops Containers
SecDevops Containers
Dangerous pod configurations
SecDevops Containers
CPU and memory limits to prevent DoS
SecDevops Containers
runAsNonRoot flag in pod configuration
SecDevops Containers
Capabilities in pod configuration
SecDevops Containers
Kubebench-CIS Kubernetes Benchmark
https://github.com/aquasecurity/kube-bench
● Master Node Security Configuration
○ API Server
○ Scheduler
○ Controller Manager /Configuration Files
○ General Security Primitives
○ PodSecurityPolicices
● Worker Node Security Configuration
○ Kubelet
○ Configuration Files
SecDevops Containers
Kubebench-CIS Kubernetes Benchmark
https://github.com/aquasecurity/kube-bench
SecDevops Containers
Kubehunter
SecDevops Containers
Kubeaudit
https://github.com/Shopify/kubeaudit
SecDevops Containers
Pod Security Policies
https://kubernetes.io/docs/concepts/policy/pod-security-policy/
SecDevops Containers
Kube PSP advisor
https://kubernetes.io/docs/concepts/policy/pod-security-policy/
"hostNetwork": [
{
"metadata": {
"name": "busy-rs",
"kind": "ReplicaSet"
},
"namespace": "psp-test",
"hostPID": true,
"hostNetwork": true,
"hostIPC": true,
"volumeTypes": [
"configMap"
]
},
{
"metadata": {
"name": "busy-pod",
"kind": "Pod"
},
"namespace": "psp-test",
"hostNetwork": true,
"volumeTypes": [
"hostPath",
"secret"
],
"mountedHostPath": [
"/usr/bin"
]
SecDevops Containers
Sysdig falco
https://sysdig.com/opensource/falco/
SecDevops Containers
Sysdig falco policies
○ A shell that runs inside a container with root
privileges.
○ A process that generates another process with
unexpected behavior.
○ Reading a confidential file, for example the
etc/shadow
○ A process that is using a file that is not a device type
in the /dev path, indicating a possible rootkit activity.
SecDevops Containers
Security best practices
● Do not run containers and pods as root.
● Disable capabilities and privileges
● One application per container, microservice
oriented approach.
● Use small images
● Training and communication is the key to
success
● DevSecOps is not about only ools but the
correct tools are necessary.
● Follow “Least privilege principle”
SecDevops Containers
● https://opensource.com/article/18/8/tools-container-s
ecurity
● https://www.devsecops.org/
● https://github.com/devsecops/awesome-devsecops
● https://cloudowski.com/articles/how-to-increase-cont
ainer-security-with-proper-images/
● https://www.twistlock.com/container-security
● https://developer.okta.com/blog/2019/07/18/container
-security-a-developer-guide
SecDevops Containers

More Related Content

PDF
Introduction to kubernetes
PDF
Containerization using docker
PPTX
An introduction to k8 s.pptx
PPTX
Introduction to Microservices with Docker and Kubernetes
PDF
Docker containerization cookbook
PDF
What's new in kubernetes 1.3?
PDF
Tech Talk - Vagrant
PPTX
Docker and kubernetes
Introduction to kubernetes
Containerization using docker
An introduction to k8 s.pptx
Introduction to Microservices with Docker and Kubernetes
Docker containerization cookbook
What's new in kubernetes 1.3?
Tech Talk - Vagrant
Docker and kubernetes

What's hot (20)

PDF
Kubernetes - how to orchestrate containers
PPTX
Dev opsec dockerimage_patch_n_lifecyclemanagement_
PDF
Orchestrating Docker containers at scale
PDF
Using Containers for Continuous Integration and Continuous Delivery
PDF
Rootless Containers
PDF
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
PDF
Docker Introduction
PPTX
Introduction to docker and oci
PDF
Introduction to Containers - SQL Server and Docker
PDF
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
PPTX
Introduction to kubernetes
PDF
Docker Security: Are Your Containers Tightly Secured to the Ship?
PPTX
Docker Presentation
PDF
Rootless Containers & Unresolved issues
PDF
Docker, Kubernetes, and Google Cloud
PDF
Wordcamp Bratislava 2017 - Docker! Why?
PDF
Docker and OpenStack Boston Meetup
PDF
Docker introduction
PDF
An Introduction to Kubernetes
PDF
Docker introduction
Kubernetes - how to orchestrate containers
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Orchestrating Docker containers at scale
Using Containers for Continuous Integration and Continuous Delivery
Rootless Containers
Containers, Clusters and Kubernetes - Brendan Burns - Defrag 2014
Docker Introduction
Introduction to docker and oci
Introduction to Containers - SQL Server and Docker
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Introduction to kubernetes
Docker Security: Are Your Containers Tightly Secured to the Ship?
Docker Presentation
Rootless Containers & Unresolved issues
Docker, Kubernetes, and Google Cloud
Wordcamp Bratislava 2017 - Docker! Why?
Docker and OpenStack Boston Meetup
Docker introduction
An Introduction to Kubernetes
Docker introduction
Ad

Similar to SecDevOps containers (20)

PPTX
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
PDF
DEVOPS UNIT 4 docker and services commands
PDF
Docker handons-workshop-for-charity
PDF
Docker for developers
PPTX
Настройка окружения для кросскомпиляции проектов на основе docker'a
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PDF
Journey to the devops automation with docker kubernetes and openshift
PDF
Testing Docker Images Security
PDF
Red Hat Container Development Kit
PDF
DCEU 18: Building Your Development Pipeline
PDF
Docker + jenkins in the enterprise (3)
PPTX
Docker - A curtain raiser to the Container world
PDF
Docker quick start
PPTX
UNITde II - Docker-Containerization.pptx,
PDF
Introduction to Docker at Glidewell Laboratories in Orange County
PDF
JOSA TechTalks - Docker in Production
PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
Selenoid
PDF
Docker for dev
PDF
Docker meetup-20-apr-17-openshit
StorageOS, Storage for Containers Shouldn't Be Annoying at Container Camp UK
DEVOPS UNIT 4 docker and services commands
Docker handons-workshop-for-charity
Docker for developers
Настройка окружения для кросскомпиляции проектов на основе docker'a
ma-formation-en-Docker-jlklk,nknkjn.pptx
Journey to the devops automation with docker kubernetes and openshift
Testing Docker Images Security
Red Hat Container Development Kit
DCEU 18: Building Your Development Pipeline
Docker + jenkins in the enterprise (3)
Docker - A curtain raiser to the Container world
Docker quick start
UNITde II - Docker-Containerization.pptx,
Introduction to Docker at Glidewell Laboratories in Orange County
JOSA TechTalks - Docker in Production
The Future of Security and Productivity in Our Newly Remote World
Selenoid
Docker for dev
Docker meetup-20-apr-17-openshit
Ad

More from Jose Manuel Ortega Candel (20)

PDF
Seguridad y auditorías en Modelos grandes del lenguaje (LLM)
PDF
Seguridad y auditorías en Modelos grandes del lenguaje (LLM).pdf
PDF
Beyond the hype: The reality of AI security.pdf
PDF
Seguridad de APIs en Drupal_ herramientas, mejores prácticas y estrategias pa...
PDF
Security and auditing tools in Large Language Models (LLM).pdf
PDF
Herramientas de benchmarks para evaluar el rendimiento en máquinas y aplicaci...
PDF
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
PDF
PyGoat Analizando la seguridad en aplicaciones Django.pdf
PDF
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
PDF
Evolution of security strategies in K8s environments- All day devops
PDF
Evolution of security strategies in K8s environments.pdf
PDF
Implementing Observability for Kubernetes.pdf
PDF
Computación distribuida usando Python
PDF
Seguridad en arquitecturas serverless y entornos cloud
PDF
Construyendo arquitecturas zero trust sobre entornos cloud
PDF
Tips and tricks for data science projects with Python
PDF
Sharing secret keys in Docker containers and K8s
PDF
Implementing cert-manager in K8s
PDF
Python para equipos de ciberseguridad(pycones)
PDF
Python para equipos de ciberseguridad
Seguridad y auditorías en Modelos grandes del lenguaje (LLM)
Seguridad y auditorías en Modelos grandes del lenguaje (LLM).pdf
Beyond the hype: The reality of AI security.pdf
Seguridad de APIs en Drupal_ herramientas, mejores prácticas y estrategias pa...
Security and auditing tools in Large Language Models (LLM).pdf
Herramientas de benchmarks para evaluar el rendimiento en máquinas y aplicaci...
Asegurando tus APIs Explorando el OWASP Top 10 de Seguridad en APIs.pdf
PyGoat Analizando la seguridad en aplicaciones Django.pdf
Ciberseguridad en Blockchain y Smart Contracts: Explorando los Desafíos y Sol...
Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments.pdf
Implementing Observability for Kubernetes.pdf
Computación distribuida usando Python
Seguridad en arquitecturas serverless y entornos cloud
Construyendo arquitecturas zero trust sobre entornos cloud
Tips and tricks for data science projects with Python
Sharing secret keys in Docker containers and K8s
Implementing cert-manager in K8s
Python para equipos de ciberseguridad(pycones)
Python para equipos de ciberseguridad

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation theory and applications.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Machine learning based COVID-19 study performance prediction
Getting Started with Data Integration: FME Form 101
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation theory and applications.pdf
20250228 LYD VKU AI Blended-Learning.pptx
1. Introduction to Computer Programming.pptx
Programs and apps: productivity, graphics, security and other tools
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Tartificialntelligence_presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectral efficient network and resource selection model in 5G networks
Machine learning based COVID-19 study performance prediction

SecDevOps containers