Core Track Guardrails-first chapter in core learning path.

Estimated Time

  • Reading: 20-25 min
  • Lab: 45-60 min
  • Quiz: 10-15 min

Prerequisites

Source Code References

  • deployment.yaml Members
  • namespaces.yaml Members

Sign in to view source code.

What You Will Produce

A reproducible lab result plus quiz verification and incident-safe operating evidence.

Incident Hook

A container compromise lands shell access inside a pod. If the pod runs with broad privileges, escalation to the host node is fast. If the security context is hardened, the attacker’s movement is severely constrained, preventing a single pod compromise from becoming a cluster-wide disaster.

Result: A simple application vulnerability allows an attacker to take over the entire node because the container was running as root with broad capabilities.

Observed Symptoms

What the team sees first:

  • A shell exists inside a compromised container.
  • The pod is able to write to host paths or escalate its own privileges.
  • Responders need to determine immediately if the workload is hardened or “soft” by default.

The difference between a minor inconvenience and a full-scale incident is often the Security Context.

Confusion Phase

When a workload is failing, broad privilege shortcuts (like privileged: true) feel tempting to “just get it working.” That is exactly when teams blur the line between debugging and introducing long-term risk.

The real question is:

  • Does the app need a specific writable path?
  • Or is the team about to grant root-like power because it is faster than fixing the actual permission gap?

Golden Baseline vs Insecure Diff

Secure Baseline (SafeOps Standard):

  • runAsNonRoot: true
  • allowPrivilegeEscalation: false
  • readOnlyRootFilesystem: true
  • capabilities.drop: ["ALL"]
  • seccompProfile: RuntimeDefault

Insecure Anti-Pattern:

  • runAsUser: 0 (Root)
  • privileged: true
  • Writable root filesystem with broad Linux capabilities.

What AI Would Propose (Brave Junior):

  • “Set privileged: true just for debugging.”
  • “Disable readOnlyRootFilesystem to make tools work quickly.”
  • “Run as root for this one release.”

Pause and Predict: Before reading the investigation, write down your top 3 hypotheses. What would you check first?