Linux_Foundation
CKS · Question #58
PART B -- FIX ONE prominent security/best-practice issue in the Deployment manifest. 4) Open the manifest vi /home/candidate/subtle-bee/deployment.yaml 5) Change ONLY ONE existing field that is a clea
To fix a prominent security/best-practice issue in the Deployment manifest located at /home/candidate/subtle-bee/deployment.yaml, identify and change one of the following existing fields to a more secure value: Option 1: runAsUser Search for /runAsUser. If you find runAsUser: 0,
Submitted by certguy· May 5, 2026Minimize Microservice Vulnerabilities
Question
PART B -- FIX ONE prominent security/best-practice issue in the Deployment manifest.
4) Open the manifest
vi /home/candidate/subtle-bee/deployment.yaml
5) Change ONLY ONE existing field that is a clear security issue.Explanation
To fix a prominent security/best-practice issue in the Deployment manifest located at /home/candidate/subtle-bee/deployment.yaml, identify and change one of the following existing fields to a more secure value:
- Option 1:
runAsUser- Search for
/runAsUser. - If you find
runAsUser: 0, change it torunAsUser: 65535.
- Search for
- Option 2:
privileged container- Search for
/privileged. - If you find
privileged: true, change it toprivileged: false.
- Search for
- Option 3:
allow privilege escalation- Search for
/allowPrivilegeEscalation. - If you find
allowPrivilegeEscalation: true, change it toallowPrivilegeEscalation: false.
- Search for
- Option 4:
writable root filesystem- Search for
/readOnlyRootFileSystem. - If you find
readOnlyRootFileSystem: false, change it toreadOnlyRootFileSystem: true.
- Search for
- Option 5:
image uses :latest- Search for
/image. - If you find
image: something:latest, change it to a pinned tag, e.g.,image: something:1.2.3.
- Search for
After changing: Save and exit the manifest using :wq.
These are single-field changes that address common security concerns.
Topics
#Pod Security Context#Least Privilege#Deployment Manifest#Container Hardening
Community Discussion
No community discussion yet for this question.