-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add default posture block test case based fromsourceallow
Modified test script to accomodate DefaultPosture logs Signed-off-by: daemon1024 <[email protected]>
- Loading branch information
1 parent
28ff194
commit b699495
Showing
7 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,7 @@ | ||
source: ubuntu-1-deployment | ||
cmd: curl 142.250.193.46 | ||
result: passed | ||
--- | ||
operation: Network | ||
condition: SOCK_STREAM | ||
action: Allow |
This file contains 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,7 @@ | ||
source: ubuntu-1-deployment | ||
cmd: curl google.com | ||
result: failed | ||
--- | ||
operation: Network | ||
condition: SOCK_DGRAM | ||
action: Block |
This file contains 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,7 @@ | ||
source: ubuntu-1-deployment | ||
cmd: wget --tries=1 142.250.193.46 | ||
result: failed | ||
--- | ||
operation: Network | ||
condition: SOCK_STREAM | ||
action: Block |
17 changes: 17 additions & 0 deletions
17
tests/scenarios/github_test_12/ksp-ubuntu-1-net-tcp-from-source-allow.yaml
This file contains 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,17 @@ | ||
apiVersion: security.kubearmor.com/v1 | ||
kind: KubeArmorPolicy | ||
metadata: | ||
name: ksp-ubuntu-1-net-tcp-from-source-allow-curl | ||
namespace: github | ||
spec: | ||
severity: 8 | ||
selector: | ||
matchLabels: | ||
container: ubuntu-1 | ||
network: | ||
matchProtocols: | ||
- protocol: tcp | ||
fromSource: | ||
- path: /usr/bin/curl | ||
action: | ||
Allow |
This file contains 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 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 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