Your Task API needs to access ConfigMaps for configuration, communicate with a PostgreSQL database in another namespace, and write logs to a persistent volume. You are classifying security controls by 4C layer. Which classification is CORRECT?
A) ConfigMap access control: Code layer; Database NetworkPolicy: Container layer; Volume encryption: Cluster layer
B) ConfigMap access control: Cluster layer; Database NetworkPolicy: Cluster layer; Volume encryption: Cloud layer
C) ConfigMap access control: Container layer; Database NetworkPolicy: Code layer; Volume encryption: Cluster layer
D) ConfigMap access control: Cloud layer; Database NetworkPolicy: Container layer; Volume encryption: Code layer
You run kubectl auth can-i get secrets --as=system:serviceaccount:task-api:task-api-sa -n task-api and receive "yes". Your Role definition is:
What is the MOST LIKELY cause of this security violation?
A) The ServiceAccount has a ClusterRoleBinding granting additional permissions beyond the Role
B) The Role should use apiGroups: ["v1"] instead of apiGroups: [""] to properly restrict access
C) The verbs array needs ["get"] only because "list" implicitly includes secret access
D) The namespace label is missing pod-security.kubernetes.io/enforce: restricted
After applying a default-deny NetworkPolicy, your Task API pods cannot resolve service names. The nslookup command times out. Which NetworkPolicy egress rule CORRECTLY fixes DNS resolution?
A)
B)
C)
D)
In the skill-first learning pattern used in this chapter, you created your cloud-security skill BEFORE learning the detailed security concepts. What is the PRIMARY pedagogical reason for this approach?
A) Skills created before learning are automatically more accurate because they use official documentation
B) Creating the skill first establishes ownership and provides a concrete artifact to test and improve as concepts are learned
C) AI skills should always be created at the beginning of each chapter to ensure consistent formatting
D) The skill creation process is faster when the student has less domain knowledge to interfere with AI suggestions
Complete the missing securityContext fields in this Deployment to make it PSS Restricted-compliant. The Task API writes temporary files to /tmp and runs the application as user 1000.
Fill in the blanks:
Complete this RBAC configuration for a monitoring service that needs to read Pod metrics across the production and staging namespaces, but NOT other namespaces. The service should NOT have cluster-wide access.
Fill in the blanks:
You run a Trivy scan on your Task API image and receive this output:
Part A (4 points): Your CI/CD pipeline uses trivy image --exit-code 1 --severity CRITICAL. Will this build PASS or FAIL? Explain why.
Your answer:
Part B (3 points): For the HIGH vulnerability in zlib1g with no fixed version, what is the MOST appropriate immediate action?
A) Wait for upstream fix and do nothing B) Remove zlib1g from the image since it's optional C) Document the risk, monitor for exploits, consider alternative base images D) Downgrade to an older version of zlib1g
Your answer and justification:
Part C (3 points): After fixing the CRITICAL vulnerability and the two fixable HIGH vulnerabilities, you rebuild. The scan now shows Total: 44 (LOW: 32, MEDIUM: 11, HIGH: 1). Is this image ready for production deployment according to the 10-point audit? Why or why not?
Your answer:
You are executing the 10-point security audit on your Task API deployment. Here are the results for three checks:
Check 2 (Minimal RBAC):
Check 3 (Default-deny NetworkPolicy):
Check 6 (PSS Restricted):
Part A (4 points): Which checks PASS and which FAIL? Complete the table:
Part B (3 points): For any FAILED check, what is the specific fix needed?
Your answer:
Part C (3 points): If Check 3 fails, what security vulnerability does this create for your Task API pods?
Your answer:
An auditor asks: "How do you demonstrate SOC2 CC6.1 (logical access restriction) and HIPAA 164.312(e)(1) (transmission security) for your Task API?"
Part A (5 points): Map TWO Kubernetes controls to SOC2 CC6.1. For each, provide the evidence collection command.
Part B (5 points): Explain how Dapr mTLS satisfies HIPAA 164.312(e)(1) transmission security. Include the verification command that demonstrates mTLS is active.
Your answer:
Scenario: You are deploying a new payment-processor service that:
Task: Design the complete security configuration by answering each part.
Part A (5 points): Write the RBAC Role that grants ONLY the necessary permissions for reading Secrets.
Part B (5 points): Write a default-deny NetworkPolicy AND an ingress allow rule that permits traffic ONLY from pods with label app: payment-gateway within the same namespace.
Part C (5 points): List the 6 securityContext fields required for PSS Restricted compliance and their correct values for this payment service running as UID 2000.
Part D (5 points): A penetration tester deploys this pod in the payment namespace:
The tester then runs: kubectl exec -n payment attacker -- curl -s payment-processor:8080/health
Question: Will this request succeed or be blocked? Explain which control prevents or allows it, and what the attacker would need to change to bypass that control.
Your answer:
Question 1: B
Question 2: A
Question 3: B
Question 4: B
Question 5:
Question 6:
Question 7:
Question 8:
Question 9:
Question 10:
Part A:
Part B:
Part C:
Part D: The request will be BLOCKED by the NetworkPolicy. The allow-payment-gateway ingress rule only permits traffic from pods with label app: payment-gateway. The attacker pod has no labels.
To bypass, the attacker would need the label app: payment-gateway or compromise an existing pod with that label.