Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions labs/exam-task13.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if kubectl get pods -o yaml securepod | grep 'runAsGroup: 2000' &>/dev/null
if kubectl get pods -o yaml securedpod | grep -Pzo "supplementalGroups:\s*\n\s*- 2000" &>/dev/null
then
echo -e "\033[32m[OK]\033[0m\t\t securepod is running with group ID 2000"
SCORE=$(( SCORE + 10 ))
Expand All @@ -7,7 +7,7 @@ else
fi
TOTAL=$(( TOTAL + 10 ))

if kubectl get pods -o yaml securepod | grep 'allowPrivilegeEscalation: false' &>/dev/null
if kubectl get pods -o yaml securedpod | grep 'allowPrivilegeEscalation: false' &>/dev/null
then
echo -e "\033[32m[OK]\033[0m\t\t container in pod securepod has privilege escalation disabled"
SCORE=$(( SCORE + 10 ))
Expand Down
2 changes: 1 addition & 1 deletion labs/exam-task15.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if kubectl get pod securepod -n oklahoma -o yaml | grep 'serviceAccount: secure' &>/dev/null
if kubectl get pod securepod -n oklahoma -o yaml | grep 'serviceAccountName: secure' &>/dev/null
then
echo -e "\033[32m[OK]\033[0m\t\t pod securepod in namespace oklahoma found and it is using the serviceaccount secure"
SCORE=$(( SCORE + 10 ))
Expand Down