From fc7bbfeb7aad7076efdff1af79386e6617a21181 Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Fri, 15 Mar 2019 15:09:45 +0100 Subject: [PATCH 1/5] =?UTF-8?q?Fixed=20the=20forgotten=20TODO=20sections?= =?UTF-8?q?=20of=20the=20docs=20=F0=9F=A4=A6=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/user-guide/README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/user-guide/README.md b/docs/user-guide/README.md index e4ece70ae2..34280099dd 100644 --- a/docs/user-guide/README.md +++ b/docs/user-guide/README.md @@ -20,16 +20,10 @@ Username: choosen Username Password: choosen Password ``` - -4. Navigate to the user management via the top bar +4. You are now logged in. Additional users can be created in the user managment section. New Users are created without any permissions, they are not even permitted to log in. This can be changed by assining them to the pre-exsisting groups are by assining them permissions individually. ![User management](../resources/userManagement.png) -5. Select the TODO account -6. Select `Account`from the left panel -7. Change the default logins for the TODO account -8. Create new users via user management as shown in step `4` - ## Starting Scan-Processes using the Camunda UI 1. After logging in via [http://your-docker-host:8080/](http://localhost:8080), the welcome screen will be displayed. From here you can start the different Camunda Web Apps. @@ -48,7 +42,7 @@ Password: choosen Password ![List of process definitions](../resources/processDefinitions.png) -4. Choose the desired scan process to display the form for configuring the scan. In this example `Port Scan` has been used. +4. Choose the desired scan process to display the form for configuring the scan. In this example `Nmap Port Scan` has been used. ![Configure a scan](../resources/configureScan.png) From 8a1c05dc11f052e756e0f84c552733ddcc47f7d9 Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Fri, 15 Mar 2019 16:10:39 +0100 Subject: [PATCH 2/5] Removed travis folding Trabis seems to fold docker log automatically --- .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b073afabb..5c4305ba0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,24 +14,10 @@ script: - npm test -- --verbose --forceExit after_failure: - docker ps -a - - echo -en "travis_fold:start:EngineLogs\r" - docker logs securecodebox_engine_1 - - echo -en "travis_fold:end:EngineLogs\r" - - echo -en "travis_fold:start:ZapLogs\r" - docker logs securecodebox_scanner-webapplication-zap_1 - - echo -en "travis_fold:end:ZapLogs\r" - - echo -en "travis_fold:start:ArachniLogs\r" - docker logs securecodebox_scanner-webapplication-arachni_1 - - echo -en "travis_fold:end:ArachniLogs\r" - - echo -en "travis_fold:start:AmassLogs\r" - docker logs securecodebox_scanner-infrastructure-amass_1 - - echo -en "travis_fold:end:AmassLogs\r" - - echo -en "travis_fold:start:NmapLogs\r" - docker logs securecodebox_scanner-infrastructure-nmap_1 - - echo -en "travis_fold:end:NmapLogs\r" - - echo -en "travis_fold:start:SSLyzeLogs\r" - docker logs securecodebox_scanner-webapplication-sslyze_1 - - echo -en "travis_fold:end:SSLyzeLogs\r" - - echo -en "travis_fold:start:NiktoLogs\r" - docker logs securecodebox_scanner-webserver-nikto_1 - - echo -en "travis_fold:end:NiktoLogs\r" From c8d7cfcfeb16bbe8ff3592c3492b8eb6510591a9 Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Fri, 15 Mar 2019 16:11:18 +0100 Subject: [PATCH 3/5] Corrected engine endpoint and expected response --- cli/run_scanner.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/run_scanner.sh b/cli/run_scanner.sh index 9affb0bf5d..b246c02946 100755 --- a/cli/run_scanner.sh +++ b/cli/run_scanner.sh @@ -266,9 +266,9 @@ if [ $(is_number "$MAX_ITER") != true ]; then fi # Verify that SCB is reachable -response=`curl --connect-timeout 5 --silent --stderr --insecure ${CURL_AUTH_ARG} ${SCB_URL}/processes/` -if [[ ! ${response} == *"key"* ]]; then - error "Failed to contact engine service! Used URI: '${SCB_URL}/processes/" "${response}" +response=`curl --connect-timeout 5 --silent --stderr --insecure ${CURL_AUTH_ARG} ${SCB_URL}/securityTests/definitions` +if [[ ! ${response} == *"nmap"* ]]; then + error "Failed to contact engine service! Used URI: '${SCB_URL}/securityTests/definitions" "${response}" NUM_ERRORS=$((NUM_ERRORS + 1)) fi From ae063ed1fd0cdbfcb666cfb63e3142071f41b75a Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Fri, 15 Mar 2019 16:11:40 +0100 Subject: [PATCH 4/5] Added basic integration test for cli --- test/cli.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/cli.test.js diff --git a/test/cli.test.js b/test/cli.test.js new file mode 100644 index 0000000000..ed8e3d6a53 --- /dev/null +++ b/test/cli.test.js @@ -0,0 +1,25 @@ +const { Time } = require('./sdk'); +const child_process = require('child_process'); + +test( + 'finds open juice-shop ports when started via cli', + async () => { + const authstring = `${global.username}:${global.password}`; + child_process.execSync( + `./run_scanner.sh -a ${authstring} nmap juice-shop`, + { + cwd: '../cli', + } + ); + + const { report } = require('../cli/job_nmap_result.json'); + + expect(report.findings.length).toBe(1); + + expect(report.findings[0].description).toBe( + 'Port 3000 is open using tcp protocol.' + ); + expect(report.findings[0].category).toBe('Open Port'); + }, + 1 * Time.Minute +); From 75d225d059b2d84b244eedf3f8d75d18788c97ad Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Fri, 15 Mar 2019 16:59:37 +0100 Subject: [PATCH 5/5] Fixed typos and wording --- docs/user-guide/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/README.md b/docs/user-guide/README.md index 34280099dd..1e3bc93825 100644 --- a/docs/user-guide/README.md +++ b/docs/user-guide/README.md @@ -20,7 +20,7 @@ Username: choosen Username Password: choosen Password ``` -4. You are now logged in. Additional users can be created in the user managment section. New Users are created without any permissions, they are not even permitted to log in. This can be changed by assining them to the pre-exsisting groups are by assining them permissions individually. +4. You are now logged in. Additional users can be created in the user managment section. New users are created without any permissions by default. They are not even permitted to log in. This can be changed by assigning them to the pre-exsisting groups or by granting them the required permission individually. ![User management](../resources/userManagement.png)