Search code examples
owaspzap

INFO org.zaproxy.addon.network.ExtensionNetwork - ZAP is now listening on 0.0.0.0:8090


I have created one pipeline to use OWASP ZAP,

pipeline {
    agent any

    stages {
        stage('Execute Zap Jar') {
            steps {
                sh '''
                java -jar /home/pl/tools/com.cloudbees.jenkins.plugins.customtools.CustomTool/OwaspZap/ZAP_2.12.0/zap-2.12.0.jar -dir "/home/pl/.ZAP" -host 0.0.0.0 -port 8090 -daemon -config api.disablekey=true 
                '''
            }
        }
        stage('Execute Zap CLI') {
            steps {
                sh '''
                export ZAP_URL=http://localhost && export ZAP_PORT=8090 && zap-cli status 
                '''
            }
        }
        stage('Execute Zap Session and Zap Scan') {
            steps {
                sh '''
                 zap-cli session new && zap-cli spider https://portail-re7-test.XXXXXX.com/ && zap-cli ajax-spider https://portail-re7-test.XXXXXX.com/ && zap-cli active-scan https://portail-re7-test.XXXXXX.com/ && zap session save default 
                '''
            }
        }
        stage('Extract Zap Report') {
            steps {
                sh '''
                 zap-cli report -o report-default.html -f html 
                '''
            }
        }
    }
}

But it is getting stuck at 7127 [ZAP-daemon] INFO org.zaproxy.addon.network.ExtensionNetwork - ZAP is now listening on 0.0.0.0:8090

can someone please help me what I am doing wrong

Regrads, SAM


Solution

  • It looks like ZAP is acting as expected - its been started and is listenning on port 8090. It has been started in daemon mode and so will stay running until you stop it. FYI this is not one of the recommended ways to run ZAP - these are listed on https://www.zaproxy.org/docs/automate/

    I'd recommend using the Automation Framework :)