feat(lab9): falco custom rules + conftest hardening policies#1423
Open
d13-l1t3 wants to merge 1 commit into
Open
feat(lab9): falco custom rules + conftest hardening policies#1423d13-l1t3 wants to merge 1 commit into
d13-l1t3 wants to merge 1 commit into
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
This PR implements runtime security monitoring and policy-as-code hardening for the DevSecOps-Intro course (Lab 9), addressing both incident detection (Falco) and configuration prevention (Conftest).
Changes
custom_rules.yaml) to detect unauthorized writes to/tmpinside containers./tmprule to prevent false positives from legitimate logging frameworks.execve) of known miner processes likexmrig.hardening.regowith 5 distinct deny rules for Kubernetes manifests (enforcingrunAsNonRoot, disablingallowPrivilegeEscalation, droppingALLcapabilities, enforcing memory limits, and requiringsha256image digests).compose-security.rego.Testing
Write to /tmp by containerrule by executing a shell inside the target container and touching a file in/tmp./tmp/xmrigand triggering anexecvesyscall, resulting in a CRITICAL alert.conftest test labs/lab9/manifests/k8s/juice-hardened.yaml --policy labs/lab9/policies/extra/(0 failures).conftest test labs/lab9/manifests/k8s/juice-unhardened.yaml --policy labs/lab9/policies/extra/(5 failures correctly identifying security misconfigurations).Artifacts & Screenshots
submissions/lab9.md(Contains all rule definitions, JSON alert outputs, and required reflections on CI vs Admission time and SLA matrices).Checklist