Skip to content

Commit e124daa

Browse files
authored
Update Docker_Security_Cheat_Sheet.md (#1898)
1 parent 0adeb7a commit e124daa

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

cheatsheets/Docker_Security_Cheat_Sheet.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,25 @@ For detailed guidance on configuring Docker networks for container communication
131131

132132
In Kubernetes environments, [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) can be used to define rules that regulate pod interactions within the cluster. These policies provide a robust framework to control how pods communicate with each other and with other network endpoints. Additionally, [Network Policy Editor](https://networkpolicy.io/) simplifies the creation and management of network policies, making it more accessible to define complex networking rules through a user-friendly interface.
133133

134-
### RULE \#6 - Use Linux Security Module (seccomp, AppArmor, or SELinux)
134+
### RULE \#6 - Use Linux Security Module (seccomp, AppArmor, or SELinux) for Runtime Security
135135

136-
**First of all, do not disable default security profile!**
136+
**First of all, do not disable default security profile!** Always start with Docker’s or your host’s default profile as a baseline.
137137

138-
Consider using security profile like [seccomp](https://docs.docker.com/engine/security/seccomp/) or [AppArmor](https://docs.docker.com/engine/security/apparmor/).
138+
**Security Profile Recommendations:**
139139

140-
Instructions how to do this inside Kubernetes can be found at [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tutorials/security/seccomp/).
140+
- **Seccomp**: Restrict syscalls to the minimum required for your container. Use Docker’s default seccomp profile as a starting point and customize per workload. [Docker Seccomp](https://docs.docker.com/engine/security/seccomp/)
141+
142+
- **AppArmor**: Apply per-container AppArmor profiles to enforce mandatory access controls. [Docker AppArmor](https://docs.docker.com/engine/security/apparmor/)
143+
144+
- **SELinux**: Enable SELinux on the host and ensure containers are labeled properly. Enforce SELinux policies to prevent unauthorized access to host resources. [SELinux Guide for Docker](https://docs.docker.com/engine/security/selinux/)
145+
146+
**Runtime Security Improvements:**
147+
148+
- **Behavioral Monitoring**: Use tools like [Falco](https://falco.org/), [Tetragon](https://cilium.io/), or [Cilium eBPF](https://cilium.io/) to detect unexpected or malicious container activity. Examples: Unexpected exec calls, privilege escalation attempts, unusual network connections.
149+
150+
- **Anomaly Detection**: Continuously monitor container processes, filesystem changes, and network activity to identify abnormal patterns in real time.
151+
152+
- **Kubernetes Security Context**: Configure pods or containers with seccomp and AppArmor profiles in Kubernetes. [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tutorials/security/seccomp/)
141153

142154
### RULE \#7 - Limit resources (memory, CPU, file descriptors, processes, restarts)
143155

0 commit comments

Comments
 (0)