feat(lab9): falco custom rules + conftest hardening policies + cryptominer detection#1418
Open
Meliman1000-7 wants to merge 25 commits into
Open
feat(lab9): falco custom rules + conftest hardening policies + cryptominer detection#1418Meliman1000-7 wants to merge 25 commits into
Meliman1000-7 wants to merge 25 commits into
Conversation
feat(lab1): juice shop deploy + PR template + triage report
feat(lab2): Threagile threat model + secure variant + auth flow bonus
feat(lab3): SSH commit signing + gitleaks pre-commit + history rewrite
feat(lab4): SBOM generation + SCA with Syft/Grype + Trivy comparison + sign-ready attestation
feat(lab5): ZAP baseline + authenticated DAST + Semgrep SAST + SQL injection correlation
feat(lab6): Checkov + KICS comparison across Terraform/Ansible/Pulumi + custom policy
feat(lab7): add Trivy security scanning and Kubernetes hardening
feat(lab8): cosign image signing, sbom, provenance and blob verification
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
Run Falco with modern eBPF to capture baseline runtime alerts and write a custom detection rule, then implement Conftest/Rego policies that gate Kubernetes manifests at CI time. Bonus: a Falco rule detecting cryptominer process execution by name.
Changes
Testing
Falco startup (modern eBPF on Docker Desktop / linuxkit 6.12.76):
docker run -d --name falco --privileged --pid=host --net=host --cgroupns=host ...
→ Opening 'syscall' source with modern BPF probe
Baseline alerts triggered via falcosecurity/event-generator:
docker run --rm --privileged --pid=host falcosecurity/event-generator run syscall --loop=false
→ 16 unique rules fired including "Run shell untrusted" and "Read sensitive file untrusted"
Custom rule "Write to /tmp by container" triggered:
docker exec lab9-target /bin/sh -c 'echo "test" > /tmp/custom-rule-test.txt'
→ {"rule":"Write to /tmp by container","priority":"Warning",...}
Cryptominer rule triggered:
docker exec lab9-target /bin/sh -c 'cp /bin/sh /tmp/xmrig && /tmp/xmrig -c exit'
→ {"rule":"Drop and execute new binary in container","priority":"Critical","proc.name":"xmrig","exe_flags":"EXE_WRITABLE|EXE_UPPER_LAYER"}
Conftest policies:
conftest test labs/lab9/manifests/good-pod.yaml --policy labs/lab9/policies/extra/
→ 4 tests, 4 passed, 0 warnings, 0 failures
Artifacts & Screenshots
Checklist