lab 7 completed - #14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Lab 7 submission: Trivy vulnerability scanning of the Juice Shop container image, hardening the Kubernetes deployment with Pod Security Standards (
restricted), NetworkPolicy, and a Conftest/Rego policy gate for CI-time enforcement.Changes
submissions/lab7.md— full report with Trivy scan results, K8s hardening walkthrough, and Conftest bonuslabs/lab7/k8s/namespace.yaml— namespace with PSSrestrictedlabels (enforce/warn/audit)labs/lab7/k8s/serviceaccount.yaml— dedicated SA withautomountServiceAccountToken: falselabs/lab7/k8s/deployment.yaml— hardened Juice Shop deployment with securityContext, read-only root FS, emptyDir mounts for writable paths, resource limits, and pinned image digestlabs/lab7/k8s/networkpolicy.yaml— default-deny ingress/egress policy allowing only TCP 3000 (ingress), UDP/TCP 53 (DNS), and TCP 443 (HTTPS)labs/lab7/policies/pod-hardening.rego— OPA/Rego policy that denies pods missing runAsNonRoot, readOnlyRootFilesystem, allowPrivilegeEscalation=false, or ALL capability dropTesting
Artifacts
lab7.md
Checklist
feat(lab7): trivy + PSS restricted + conftest gate)submissions/lab7.mdexistsPersonal Notes
Had to mount three emptyDir volumes (
/tmp,/usr/src/app/logs,/usr/src/app/data) to get Juice Shop running withreadOnlyRootFilesystem: true. Without them the container crash-looped because the app writes session data, logs, and an SQLite DB at runtime. Usedmedium: Memoryon the/tmpvolume to reduce node disk I/O since it's just transient session scratch space.