Interview Security & DevSecOps

How do you secure container runtime (seccomp, AppArmor, capabilities, read-only root)? [Advanced]

Answer

I secure container runtime by reducing privileges and attack surface: run as non-root, drop Linux capabilities, use seccomp/AppArmor/SELinux profiles, set read-only root filesystems, avoid privileged mode, restrict host namespaces and hostPath mounts, and keep images minimal and patched.

Technical explanation

Runtime security starts in the Dockerfile and Kubernetes securityContext.

seccomp limits syscalls, AppArmor/SELinux enforce mandatory access controls, and capabilities control fine-grained root privileges.

Read-only filesystems and no-root execution make post-exploitation harder.

Hands-on example

Kubernetes securityContext:

securityContext:

runAsNonRoot: true

runAsUser: 10001

allowPrivilegeEscalation: false

readOnlyRootFilesystem: true

capabilities:

drop: ["ALL"]

seccompProfile:

type: RuntimeDefault

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Security & DevSecOps interview questions

← All Security & DevSecOps questions