-
Notifications
You must be signed in to change notification settings - Fork 26
feat(network): symmetric R0011/R0012 with NetworkPolicy-style internal allowlisting and port-aware alerting #923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
entlein
wants to merge
23
commits into
kubescape:main
Choose a base branch
from
k8sstormcenter:feat/network-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
14a3283
allow networkpolicy to be a cel selector for internal/external traffi…
entlein e6b7fab
Allow alert from unexpected Ports, allow Port=0 as intentional wildcard
entlein 456d267
Allow alert from unexpected Ports, allow Port=0 as intentional wildcard
entlein ffb22be
remove explicit wildcard, declare port as non-mandatory, keep the ale…
entlein 283098d
feat(cel/network): serviceRef/serviceSelector/host neighbor resolution
entlein 6f30d65
feat(cel/network): real-Flux component test, RBAC + perf fixes for se…
entlein 7d294ca
test(component): scope the internal-egress rule to the serviceRef suite
entlein 8d5a019
test(chart): make network service resolution a value
entlein 369fbe6
fix(cel): invalidate cached results when a profile is re-resolved
entlein e240448
feat(rules): R0012 unexpected internal egress
entlein 9537cf0
feat(rules): R0011/R0012 symmetric egress/ingress, no IP-class gate
entlein b9328c0
Merge remote-tracking branch 'origin/upstream-pr/portalerts' into fea…
entlein 8a74230
Merge remote-tracking branch 'origin/upstream-pr/serviceref-network' …
entlein 9c272fa
Merge branch 'feat/rules-internal-egress' into feat/network-v2
entlein 9a5dca6
dedup selector engine after portalerts merge
entlein 60962b8
pin storage to k8sstormcenter/storage@3844202a (dnsNames + deflate fi…
entlein 70ebf6d
test(component): Test_50 asserts shipped R0011; Test_51 ingress R0012…
entlein 20791f1
chart(kubescape-rules): standalone chart shipping the R0011/R0012 rul…
entlein eb2f79e
Merge branch 'feat/rules-internal-egress' into feat/network-v2
entlein 5a17ba0
rules: consume the peer-selector engine in R0011/R0012
entlein 4280eae
review: address maintainer blockers on network-v2
entlein 91c6dec
fix(cel/network): label-only peer matching, empty selector fails closed
entlein daad334
test(networkpeer): characterize excludeNamespaces × selector resolution
entlein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| apiVersion: v2 | ||
| name: kubescape-rules | ||
| description: Kubescape runtime detection rules — symmetric R0011 egress / R0012 ingress, port-aware, selector- and serviceRef-allowlisted internal traffic | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "network-v2" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| apiVersion: kubescape.io/v1 | ||
| kind: RuntimeRuleAlertBinding | ||
| metadata: | ||
| name: all-rules-all-pods | ||
| spec: | ||
| namespaceSelector: | ||
| # exclude K8s system namespaces | ||
| matchExpressions: | ||
| - key: "kubernetes.io/metadata.name" | ||
| operator: "NotIn" | ||
| values: | ||
| - "kube-system" | ||
| - "kube-public" | ||
| - "kube-node-lease" | ||
| - "kubeconfig" | ||
| rules: | ||
| - ruleName: "Unexpected process launched" | ||
| - ruleName: "Unexpected process arguments" | ||
| - ruleName: "Files Access Anomalies in container" | ||
| - ruleName: "Syscalls Anomalies in container" | ||
| - ruleName: "Linux Capabilities Anomalies in container" | ||
| - ruleName: "DNS Anomalies in container" | ||
| - ruleName: "Unexpected service account token access" | ||
| - ruleName: "Workload uses Kubernetes API unexpectedly" | ||
| - ruleName: "Process Executed from /dev/shm" | ||
| - ruleName: "Process tries to load a kernel module" | ||
| - ruleName: "Drifted process executed" | ||
| - ruleName: "SSH Connection to Unexpected Destination on Non-Standard Port" | ||
| - ruleName: "Fileless execution detected" | ||
| - ruleName: "Crypto miner launched" | ||
| - ruleName: "Process executed from mount" | ||
| - ruleName: "Crypto Mining Related Port Communication" | ||
| - ruleName: "Crypto Mining Domain Communication" | ||
| - ruleName: "Read Environment Variables from procfs" | ||
| - ruleName: "eBPF Program Load" | ||
| - ruleName: "Soft link created over sensitive file" | ||
| - ruleName: "Unexpected Sensitive File Access" | ||
| - ruleName: "Hard link created over sensitive file" | ||
| - ruleName: "Exec to pod" | ||
| - ruleName: "Port forward to pod" | ||
| - ruleName: "Unexpected Egress Network Traffic" | ||
| - ruleName: "Unexpected Ingress Network Traffic" | ||
| - ruleName: "Unexpected Ptrace Syscall Usage" | ||
| - ruleName: "Unexpected io_uring Operation Detected" | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chicken, please remove those here, thats the PR to rulelibrary, but add them to the tests/** folder