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" 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 diff --git a/docs/user-guide/README.md b/docs/user-guide/README.md index e4ece70ae2..1e3bc93825 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 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) -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) 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 +);