A security team wants to ensure that all pods in a namespace run with a restricted seccomp profile. Which Pod Security Standard admission controller mode should be used to enforce this without blocking necessary pods?
Trap 1: Use a mutating admission webhook to automatically add seccomp…
A mutating admission webhook that automatically adds seccomp profiles only modifies the pod spec; it does not reject pods that still violate other restricted constraints such as running as root, adding capabilities, or using privileged containers. Attackers could craft pods that bypass the webhook if it's not configured as the only admission controller, and mutation alone never produces an admission rejection. Therefore, it lacks the enforcement guarantee required to ensure all pods are compliant.
Trap 2: Enable the PodSecurity admission plugin with the 'baseline' policy…
The 'baseline' policy is intentionally less restrictive than 'restricted'; it does not mandate a seccomp profile and permits several privileged settings that restricted forbids, like certain capabilities and hostPID sharing. Even with 'enforce' mode blocking violations of baseline, pods would still be allowed without seccomp, failing the security team's requirement. Only the restricted policy imposes the necessary seccomp requirement, so this combination is insufficient.
Trap 3: Enable the PodSecurity admission plugin with the 'restricted'…
'warn' mode with the restricted policy generates warning messages for violating pods, but it does not block their creation; a pod that lacks seccomp would still be admitted and run. This mode is designed for user-facing feedback or auditing, not enforcement, and therefore doesn't guarantee compliance. The security team needs enforce mode to actually prevent non-compliant pods from running.
- A
Enable the PodSecurity admission plugin with the 'restricted' policy and 'enforce' mode
PodSecurity admission with the 'restricted' policy in 'enforce' mode acts as an admission controller that rejects any pod that fails the restricted profile, including the requirement that seccomp be set to RuntimeDefault or Localhost. This directly blocks non-compliant pods at creation time, ensuring only pods meeting the strict security requirements run in the namespace. Enforce mode is the only mode that provides hard enforcement, making this the correct choice.
- B
Use a mutating admission webhook to automatically add seccomp profiles
Why wrong: A mutating admission webhook that automatically adds seccomp profiles only modifies the pod spec; it does not reject pods that still violate other restricted constraints such as running as root, adding capabilities, or using privileged containers. Attackers could craft pods that bypass the webhook if it's not configured as the only admission controller, and mutation alone never produces an admission rejection. Therefore, it lacks the enforcement guarantee required to ensure all pods are compliant.
- C
Enable the PodSecurity admission plugin with the 'baseline' policy and 'enforce' mode
Why wrong: The 'baseline' policy is intentionally less restrictive than 'restricted'; it does not mandate a seccomp profile and permits several privileged settings that restricted forbids, like certain capabilities and hostPID sharing. Even with 'enforce' mode blocking violations of baseline, pods would still be allowed without seccomp, failing the security team's requirement. Only the restricted policy imposes the necessary seccomp requirement, so this combination is insufficient.
- D
Enable the PodSecurity admission plugin with the 'restricted' policy and 'warn' mode
Why wrong: 'warn' mode with the restricted policy generates warning messages for violating pods, but it does not block their creation; a pod that lacks seccomp would still be admitted and run. This mode is designed for user-facing feedback or auditing, not enforcement, and therefore doesn't guarantee compliance. The security team needs enforce mode to actually prevent non-compliant pods from running.