From 6c7adb968a889d984fe7140dc5bf159340b4db2d Mon Sep 17 00:00:00 2001 From: Robert Seedorff Date: Sat, 26 Jun 2021 15:57:19 +0200 Subject: [PATCH] Refactored the demo-apps name Signed-off-by: Robert Seedorff --- .../integrating-a-hook/integration-tests.md | 10 +++++----- docs/contributing/integrating-a-scanner.md | 2 +- .../integrating-a-scanner/examples-dir.md | 18 +++++++++--------- .../integrating-a-scanner/integration-tests.md | 12 ++++++------ docs/how-tos/scanning-networks.md | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/contributing/integrating-a-hook/integration-tests.md b/docs/contributing/integrating-a-hook/integration-tests.md index 289956f1..dd0673c0 100644 --- a/docs/contributing/integrating-a-hook/integration-tests.md +++ b/docs/contributing/integrating-a-hook/integration-tests.md @@ -12,7 +12,7 @@ for your hook to check if everything is running smoothly together. ## Write your tests In most cases, the simplest and most effective way -to test your hook is by running it after test-scan or against a scan of a demo-app. You can also re-use one of the examples you provided. +to test your hook is by running it after test-scan or against a scan of a `demo-target`. You can also re-use one of the examples you provided. Let's have a look at the [read-write-hook](https://github.com/secureCodeBox/secureCodeBox/blob/main/tests/integration/generic/read-write-hook.test.js) test to understand all the steps required: @@ -47,8 +47,8 @@ test( ); ``` -At first, we start our scan function, and we feed it with a scan name (`test-scan-read-write-hook`), the specific scan command (`test-scan`) and a list of parameters (`[]`) for the scan. Likely, you can copy them from an example. Note that you must refer to your targeted demo-app via -`name.demp-apps.svc` if it is installed in the "demo-apps" namespace. +At first, we start our scan function, and we feed it with a scan name (`test-scan-read-write-hook`), the specific scan command (`test-scan`) and a list of parameters (`[]`) for the scan. Likely, you can copy them from an example. Note that you must refer to your targeted demo-target via +`name.demp-targets.svc` if it is installed in the "demo-targets" namespace. **Please don't use any external websites (like google.com) in your integration tests!** The last parameter is a test timeout in seconds. This timeout should be lower than the general one for the jest test @@ -80,10 +80,10 @@ helm -n integration-tests install test-scan ./scanner/test-scan helm -n integration-tests install your-hook ./hooks/your-hook ``` -If not yet installed, install the targeted demo-app. +If not yet installed, install the targeted `demo-target`. ```bash -helm -n demo-apps install targeted-app ./demo-apps/targeted-app +helm -n demo-targets install targeted-app ./demo-targets/targeted-app ``` Of course, you can also install other resources, if needed. diff --git a/docs/contributing/integrating-a-scanner.md b/docs/contributing/integrating-a-scanner.md index d7f39113..3bc5639f 100644 --- a/docs/contributing/integrating-a-scanner.md +++ b/docs/contributing/integrating-a-scanner.md @@ -17,7 +17,7 @@ scanners/nmap │   └── ... ├── Chart.yaml ├── examples -│   ├── demo-app-ssh +│   ├── demo-target-ssh │   │   ├── findings.yaml │   │   ├── nmap-results.xml │   │   └── scan.yaml diff --git a/docs/contributing/integrating-a-scanner/examples-dir.md b/docs/contributing/integrating-a-scanner/examples-dir.md index 3dc0e400..8907e1ad 100644 --- a/docs/contributing/integrating-a-scanner/examples-dir.md +++ b/docs/contributing/integrating-a-scanner/examples-dir.md @@ -28,7 +28,7 @@ For nmap a `scan.yaml` could look like the following: # Service Detection enabled - "-sV" # Actual Service Address will depend on you cluster and namespace configuration. 🤷<200d> - - juice-shop.demo-apps.svc.cluster.local + - juice-shop.demo-targets.svc.cluster.local ``` ## findings.yaml @@ -51,7 +51,7 @@ For the provided nmap example this looks like the following: "ip_address": "10.111.199.4", "mac_address": null, "protocol": "tcp", - "hostname": "juice-shop.demo-apps.svc.cluster.local", + "hostname": "juice-shop.demo-targets.svc.cluster.local", "method": "probed", "operating_system": null, "service": "http", @@ -62,15 +62,15 @@ For the provided nmap example this looks like the following: "id": "a9ec9f11-4cfa-461b-85c0-57ea31162112" }, { - "name": "Host: juice-shop.demo-apps.svc.cluster.local", + "name": "Host: juice-shop.demo-targets.svc.cluster.local", "category": "Host", "description": "Found a host", - "location": "juice-shop.demo-apps.svc.cluster.local", + "location": "juice-shop.demo-targets.svc.cluster.local", "severity": "INFORMATIONAL", "osi_layer": "NETWORK", "attributes": { "ip_address": "10.111.199.4", - "hostname": "juice-shop.demo-apps.svc.cluster.local", + "hostname": "juice-shop.demo-targets.svc.cluster.local", "operating_system": null }, "id": "080d888a-a9bc-4c74-8d03-c4c6cc40238d" @@ -87,8 +87,8 @@ For this nmap scan this would be a XML file: - - + + @@ -96,8 +96,8 @@ For this nmap scan this would be a XML file:
- - + + diff --git a/docs/contributing/integrating-a-scanner/integration-tests.md b/docs/contributing/integrating-a-scanner/integration-tests.md index b69c3235..417a4f80 100644 --- a/docs/contributing/integrating-a-scanner/integration-tests.md +++ b/docs/contributing/integrating-a-scanner/integration-tests.md @@ -12,7 +12,7 @@ for your scanner to check if everything is running smoothly together. ## Write your tests In most cases, the simplest and most effective way -to test your scanner is by running it against a demo-app. You can also re-use one of the examples you provided. +to test your scanner is by running it against a `demo-target`. You can also re-use one of the examples you provided. Let's have a look at the [ssh-scan](https://github.com/secureCodeBox/secureCodeBox/blob/main/tests/integration/scanner/ssh-scan.test.js) test to understand all the steps required: @@ -23,7 +23,7 @@ test( const { categories, severities, count } = await scan( "ssh-scan-dummy-ssh", // Name of test "ssh-scan", // Name of scan command - ["-t", "dummy-ssh.demo-apps.svc"], // Parameters + ["-t", "dummy-ssh.demo-targets.svc"], // Parameters 90 ); @@ -46,8 +46,8 @@ test( ``` At first, we start our scan function, and we feed it with a scan name, the specific scan command and a list of parameters -for the scan. Likely, you can copy them from an example. Note that you must refer to your targeted demo-app via -`name.demp-apps.svc` if it is installed in the "demo-apps" namespace. +for the scan. Likely, you can copy them from an example. Note that you must refer to your targeted demo-target via +`name.demp-apps.svc` if it is installed in the "demo-targets" namespace. **Please don't use any external websites (like google.com) in your integration tests!** The last parameter is a test timeout in seconds. This timeout should be lower than the general one for the jest test @@ -74,9 +74,9 @@ After that, install your created scanner: `helm -n integration-tests install your-scanner ./scanners/your-scanner` -If not yet installed, install the targeted demo-app. +If not yet installed, install the targeted demo-target. -`helm -n demo-apps install targeted-app ./demo-apps/targeted-app` +`helm -n demo-targets install targeted-app ./demo-targets/targeted-app` Of course, you can also install other resources, if needed. diff --git a/docs/how-tos/scanning-networks.md b/docs/how-tos/scanning-networks.md index 7669e985..6f0be3ef 100644 --- a/docs/how-tos/scanning-networks.md +++ b/docs/how-tos/scanning-networks.md @@ -196,5 +196,5 @@ kubectl apply -f cascadingRule.yaml Have fun scanning and checking your networks! -[Nmap Example Findings]: https://github.com/secureCodeBox/secureCodeBox/blob/master/scanners/nmap/examples/demo-app-ssh/findings.yaml +[Nmap Example Findings]: https://github.com/secureCodeBox/secureCodeBox/blob/master/scanners/nmap/examples/demo-target-ssh/findings.yaml [predefined ncrack cascading rule]: https://github.com/secureCodeBox/secureCodeBox/blob/master/scanners/ncrack/cascading-rules/crackssh.yaml