feat(lab9): Falco custom rules + Conftest hardening policies#1450
Open
alberto-de-swerto wants to merge 1 commit into
Open
feat(lab9): Falco custom rules + Conftest hardening policies#1450alberto-de-swerto wants to merge 1 commit into
alberto-de-swerto 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.
Lab 9 β runtime detection (Falco) + policy-as-code (Conftest). Write-up in
submissions/lab9.md.What I did
Write to /tmp by containerthat fires on the test write.labs/lab9/policies/extra/hardening.rego(5 rules: runAsNonRoot, allowPrivilegeEscalation, drop ALL caps, memory limit, digest-pinned image). Hardened manifest passes (10/10), unhardened fails with all 5 denies; also ran the shipped compose policy (pass on juice-compose, fail on a bad compose).Possible Cryptominer Activitycombines two indicators (mining-pool ports + known miner process names), CRITICAL; fires on a miner-named process.Notes
sys_enter_connecttracepoint, so Falco can't read the connect destination (fd.sport=<NA>). That only affects the cryptominer rule's port branch, so I trigger that rule via its process-name branch and explain the limitation.falco/rules/custom-rules.yaml,policies/extra/hardening.rego,submissions/lab9.md). Falco logs are gitignored; alerts are pasted into the submission.Checklist