docs(lab9): add lab9 β falco runtime + conftest policies#12
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
Implement runtime threat detection with Falco and policy-as-code enforcement with Conftest (OPA/Rego) for Kubernetes and Docker Compose manifests. Covers Lab 9 Tasks 1 and 2.
Changes
labs/lab9/falco/rules/custom-rules.yamlβ custom Falco rule detecting writes to/usr/local/bin/inside containerslabs/lab9/falco/logs/falco.logβ captured Falco alerts (Terminal shell + drift write + event generator)labs/lab9/manifests/k8s/juice-unhardened.yamlβ baseline K8s Deployment with intentional misconfigurations (privileged, root, no limits)labs/lab9/manifests/k8s/juice-hardened.yamlβ compliant K8s Deployment with full security context hardeninglabs/lab9/manifests/compose/juice-compose.ymlβ Docker Compose manifest with privileged + root misconfigurationslabs/lab9/policies/k8s-security.regoβ Rego policy enforcing K8s hardening (3 deny + 2 warn rules)labs/lab9/policies/compose-security.regoβ Rego policy enforcing Compose security patternslabs/lab9/analysis/conftest-unhardened.txtβ Conftest results: 3 failures, 2 warningslabs/lab9/analysis/conftest-hardened.txtβ Conftest results: 7/7 pass, 0 failureslabs/lab9/analysis/conftest-compose.txtβ Conftest results: 1 failure, 1 warninglabs/submission9.mdβ full analysis and evidence write-upTesting
5.15.167.4-microsoft-standard-WSL2Terminal shell in containeralert (Notice) viadocker exec -it lab9-helper /bin/sh -lc 'echo hello-from-shell'Write Binary Under UsrLocalBinalert (Warning) viaecho boom > /usr/local/bin/drift.txtβ captured full JSON withFD_UPPER_LAYERflagecho custom-test > /usr/local/bin/custom-rule.txtfalcosecurity/event-generator run syscallβ Falco produced 20 alerts across 18 built-in rules including 3 Critical (fileless memfd execution, release_agent container escape, dropped binary execution)openpolicyagent/conftest:latestwith OPA v1 Rego syntaxArtifacts & Screenshots
Falco Alert 1 β Terminal shell in container (Notice):
Falco Alert 2 β Drift write to /usr/local/bin (Warning):
Event generator β 3 Critical alerts (selected):
Conftest summary:
Checklist