From d79eb88392e2f1c18932743de97492f136c11d00 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 16 May 2023 10:13:03 +0530 Subject: [PATCH 01/44] Create Jenkinsfile --- Jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..decd4a3b --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent any + tools { + maven 'Maven' + } + stages { + stage ('Initialize') { + steps { + sh ''' + echo "PATH = ${PATH}" + echo "M2_HOME = ${M2_HOME}" + ''' + } + } + + stage ('Build') { + sh 'mvn clean package' + } + + } + } From 214670f0f228542a72ac4f26a75bb02dbf9ef0c0 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 16 May 2023 10:16:39 +0530 Subject: [PATCH 02/44] Update Jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index decd4a3b..250e6b82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,9 @@ pipeline { } stage ('Build') { + steps { sh 'mvn clean package' } - + } } } From 731053bb4754ed826ee7c229faa245174385b021 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 16 May 2023 10:24:08 +0530 Subject: [PATCH 03/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 250e6b82..928859ec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any tools { - maven 'Maven' + maven 'MAVEN' } stages { stage ('Initialize') { From 16fab1c68ac26257d601cf50dc3674c8e0afebcc Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 30 May 2023 19:18:39 +0530 Subject: [PATCH 04/44] Update Jenkinsfile From 2de7657b5d00ad3d1f3ff2414a08db90fa35a63c Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Wed, 31 May 2023 20:12:35 +0530 Subject: [PATCH 05/44] Update Jenkinsfile --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 928859ec..3f88b79b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,5 +18,12 @@ pipeline { sh 'mvn clean package' } } + stage ('Deploy-To-Tomcat') { + steps { + sshagent(['tomcat']) { + sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' + } + } + } } } From 34b9895c3399ed3ce3142adaef2e4e5535bcadc1 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Wed, 31 May 2023 20:42:44 +0530 Subject: [PATCH 06/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3f88b79b..3d2ae205 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' + sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' } } } From 8bc183b82a70047dffcf7a5e4aaea54aea33618f Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:19:02 +0530 Subject: [PATCH 07/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3d2ae205..197e3187 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' + sh 'sudo scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' } } } From 3c9b181f174d6b6c3147e0fded691091451c8b60 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:21:56 +0530 Subject: [PATCH 08/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 197e3187..cd51d299 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'sudo scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' + sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' } } } From 5f04b12bee067b92a014eca9d41fe889e331fda8 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:54:08 +0530 Subject: [PATCH 09/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index cd51d299..49b0b519 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/webapp.war' + sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/' } } } From e6f9c2520c2cfd59f46dba768e75b7d631400293 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 18:21:03 +0530 Subject: [PATCH 10/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 49b0b519..72c91cbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/' + sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/' } } } From c8917e261fa565fecbb3e0ea589a80fb93669572 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 18:47:20 +0530 Subject: [PATCH 11/44] Update Jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 72c91cbb..4d2a9fa0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,8 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/var/lib/tomcat9/webapps/ROOT/' + sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' + sh 'cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' } } } From 1f9b290c2be9b83176ea30e555b095e3b6eb4ecf Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 19:03:46 +0530 Subject: [PATCH 12/44] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d2a9fa0..003d24b1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,8 +21,8 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' - sh 'cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' + sh 'sudo scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' + sh 'sudo cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' } } } From ddf52e78f91e92612077c3c885aefd015bfdf9f6 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Thu, 1 Jun 2023 19:05:45 +0530 Subject: [PATCH 13/44] Update Jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 003d24b1..4d2a9fa0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,8 +21,8 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'sudo scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' - sh 'sudo cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' + sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' + sh 'cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' } } } From 06b9211af6efea2f26166acbd2054fee5a54bdad Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:36:16 +0530 Subject: [PATCH 14/44] Update Jenkinsfile --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d2a9fa0..2f6c83eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,8 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/' - sh 'cp /home/shubham/WebApp.war /var/lib/tomcat9/webapps/ROOT/' + sh 'scp -o -v StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' } } } From deb31a4e8da1109b783aa166c1dbd1c23eb22cc8 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:38:04 +0530 Subject: [PATCH 15/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f6c83eb..e4720701 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { stage ('Deploy-To-Tomcat') { steps { sshagent(['tomcat']) { - sh 'scp -o -v StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' + sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' } } } From 950a5e0d200c994f110dad292a8b0046e24c9f72 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:53:00 +0530 Subject: [PATCH 16/44] Update Jenkinsfile --- Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e4720701..516cb2dc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,12 +18,12 @@ pipeline { sh 'mvn clean package' } } - stage ('Deploy-To-Tomcat') { - steps { - sshagent(['tomcat']) { - sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' - } - } - } +// stage ('Deploy-To-Tomcat') { +// steps { +// sshagent(['tomcat']) { +// sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' +// } +// } +// } } } From a785849d50fbc1f5dabfa02b3889da14299ff89d Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:07:03 +0530 Subject: [PATCH 17/44] Update Jenkinsfile --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 516cb2dc..c259c407 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,5 +25,10 @@ pipeline { // } // } // } + stage ('SCAN for DAST') { + steps { + sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' + } + } } } From 732bef53f15e91436140e10fd274f1c50a7da3b9 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:08:50 +0530 Subject: [PATCH 18/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c259c407..2ddb8395 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' + sh 'sudo docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' } } } From ef9acafcf05a7dcbd86c804fb0a68dfabfd75faf Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:16:32 +0530 Subject: [PATCH 19/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ddb8395..c259c407 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'sudo docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' + sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' } } } From d4340019badf48867a8d47f96187d5062d0d17a2 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:24:23 +0530 Subject: [PATCH 20/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c259c407..b3771aa4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r /home/shubham/report.html' + sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' } } } From f3aded999c162b224c1add0d5095322a874bb891 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:30:10 +0530 Subject: [PATCH 21/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b3771aa4..6d043307 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' + sh 'docker run -v $(pwd):/home/shubham/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' } } } From 692ca98c7481b2d67eef1d2acc70591763a51b6c Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 11:31:41 +0530 Subject: [PATCH 22/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6d043307..aa412766 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/home/shubham/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' + sh 'docker run -v $(pwd):/zap/wrk:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' } } } From 7a6d537bf0361f75e1d43cdc689ebb69715d9c0b Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 18:16:20 +0530 Subject: [PATCH 23/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index aa412766..b3771aa4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/zap/wrk:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' + sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' } } } From 1abdfb4a61663557b79677cfb89d2074cf9ae45c Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Fri, 9 Jun 2023 18:30:39 +0530 Subject: [PATCH 24/44] Update Jenkinsfile --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b3771aa4..6981f24a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,12 @@ pipeline { // } stage ('SCAN for DAST') { steps { - sh 'docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html' + sh '''#!/bin/bash + +command="docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html" + +eval $command +''' } } } From 053ade192c468911f4bcf1f9c55d492815a550a5 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 27 Jun 2023 10:27:43 +0530 Subject: [PATCH 25/44] Rename Jenkinsfile to JenkinsFile --- Jenkinsfile => JenkinsFile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Jenkinsfile => JenkinsFile (100%) diff --git a/Jenkinsfile b/JenkinsFile similarity index 100% rename from Jenkinsfile rename to JenkinsFile From 98d0dd361c54f2f480f884c4456694d211c14eee Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 27 Jun 2023 10:28:22 +0530 Subject: [PATCH 26/44] Create Jenkinsfile --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..db89a483 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +// Jenkinsfile (Declarative Pipeline) for integration of Dastardly, from Burp Suite. + +pipeline { + agent any + stages { + stage ("Docker Pull Dastardly from Burp Suite container image") { + steps { + sh 'docker pull public.ecr.aws/portswigger/dastardly:latest' + } + } + stage ("Docker run Dastardly from Burp Suite Scan") { + steps { + cleanWs() + sh ''' + docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \ + -e DASTARDLY_TARGET_URL=https://ginandjuice.shop/ \ + -e DASTARDLY_OUTPUT_FILE=${WORKSPACE}/dastardly-report.xml \ + public.ecr.aws/portswigger/dastardly:latest + ''' + } + } + } + post { + always { + junit testResults: 'dastardly-report.xml', skipPublishingChecks: true + } + } +} From 609c87bd9cddd5902b4a987aab407073848635f5 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 27 Jun 2023 10:41:39 +0530 Subject: [PATCH 27/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index db89a483..49864a54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { cleanWs() sh ''' docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \ - -e DASTARDLY_TARGET_URL=https://ginandjuice.shop/ \ + -e DASTARDLY_TARGET_URL=http://ecgc.cdacmumbai.in/epms/ \ -e DASTARDLY_OUTPUT_FILE=${WORKSPACE}/dastardly-report.xml \ public.ecr.aws/portswigger/dastardly:latest ''' From ed417a45319c017633c99f5f949da12b8d64b459 Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:01:53 +0530 Subject: [PATCH 28/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 49864a54..1b7d71d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { cleanWs() sh ''' docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \ - -e DASTARDLY_TARGET_URL=http://ecgc.cdacmumbai.in/epms/ \ + -e DASTARDLY_TARGET_URL=https://ecgc.cdacmumbai.in/epms/ \ -e DASTARDLY_OUTPUT_FILE=${WORKSPACE}/dastardly-report.xml \ public.ecr.aws/portswigger/dastardly:latest ''' From 8ed8e67eb1258eb1090c45e3fc57536b1bbaea0c Mon Sep 17 00:00:00 2001 From: Shubham-Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:09:35 +0530 Subject: [PATCH 29/44] Update Jenkinsfile update the target website http://cdacmumbai.in/ --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1b7d71d4..a95cb9ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,7 +13,7 @@ pipeline { cleanWs() sh ''' docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \ - -e DASTARDLY_TARGET_URL=https://ecgc.cdacmumbai.in/epms/ \ + -e DASTARDLY_TARGET_URL=http://cdacmumbai.in/ \ -e DASTARDLY_OUTPUT_FILE=${WORKSPACE}/dastardly-report.xml \ public.ecr.aws/portswigger/dastardly:latest ''' From 5d5adfde1bd9622090013b8bcd81b3e34fe9b9f7 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:13:48 +0530 Subject: [PATCH 30/44] Update Jenkinsfile devsecops demo --- Jenkinsfile | 82 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a95cb9ca..cb800cdb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,28 +1,68 @@ -// Jenkinsfile (Declarative Pipeline) for integration of Dastardly, from Burp Suite. - pipeline { - agent any - stages { - stage ("Docker Pull Dastardly from Burp Suite container image") { - steps { - sh 'docker pull public.ecr.aws/portswigger/dastardly:latest' - } + agent any + tools { + maven 'Maven' + } + stages { + stage ('Initialize') { + steps { + sh ''' + echo "PATH = ${PATH}" + echo "M2_HOME = ${M2_HOME}" + ''' + } + } + + stage ('Check-Git-Secrets') { + steps { + sh 'rm trufflehog || true' + sh 'docker run gesellix/trufflehog --json https://github.com/Shubham-Bhingarde/webapp.git > trufflehog' + sh 'cat trufflehog' + } + } + + stage ('Source Composition Analysis') { + steps { + sh 'rm owasp* || true' + sh 'wget "https://raw.githubusercontent.com/cehkunal/webapp/master/owasp-dependency-check.sh" ' + sh 'chmod +x owasp-dependency-check.sh' + sh 'bash owasp-dependency-check.sh' + sh 'cat /var/lib/jenkins/OWASP-Dependency-Check/reports/dependency-check-report.xml' + + } + } + + stage ('SAST') { + steps { + withSonarQubeEnv('sonar') { + sh 'mvn sonar:sonar' + sh 'cat target/sonar/report-task.txt' } - stage ("Docker run Dastardly from Burp Suite Scan") { + } + } + + stage ('Build') { + steps { + sh 'mvn clean package' + } + } + + stage ('Deploy-To-Tomcat') { steps { - cleanWs() - sh ''' - docker run --user $(id -u) -v ${WORKSPACE}:${WORKSPACE}:rw \ - -e DASTARDLY_TARGET_URL=http://cdacmumbai.in/ \ - -e DASTARDLY_OUTPUT_FILE=${WORKSPACE}/dastardly-report.xml \ - public.ecr.aws/portswigger/dastardly:latest - ''' - } - } + sshagent(['tomcat']) { + sh 'scp -o StrictHostKeyChecking=no target/*.war user1@10.210.12.93:/prod/apache-tomcat-9.0.110/webapps/webapp.war' + } + } } - post { - always { - junit testResults: 'dastardly-report.xml', skipPublishingChecks: true + + + stage ('DAST') { + steps { + sshagent(['zap']) { + sh 'ssh -o StrictHostKeyChecking=no user1@10.210.12.83 "docker run -t owasp/zap2docker-stable zap-baseline.py -t http://10.210.12.93:8080/webapp/" || true' } + } } + + } } From 7e6f295a381cd9dd2793e6a187be9fb880372a3f Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:48:36 +0530 Subject: [PATCH 31/44] Update Jenkinsfile trufflehog configuration --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index cb800cdb..70326c2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,8 +16,8 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog || true' - sh 'docker run gesellix/trufflehog --json https://github.com/Shubham-Bhingarde/webapp.git > trufflehog' - sh 'cat trufflehog' + sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp.git --results=verified > trufflehog.txt' + sh 'cat trufflehog.txt' } } From 22246e248bb2b52b97a0460b6dabab0c68589791 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:50:23 +0530 Subject: [PATCH 32/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70326c2d..334ee524 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog || true' - sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp.git --results=verified > trufflehog.txt' + sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 48aa3c60b58c6a4ddafbdcbaa464c94578917b03 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:52:59 +0530 Subject: [PATCH 33/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 334ee524..a22f90f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { - sh 'rm trufflehog || true' + sh 'rm trufflehog.txt || true' sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } From 808302975670e20a7c1077e96432df1551fb6be6 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:54:08 +0530 Subject: [PATCH 34/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a22f90f7..2cbee901 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 34b64f2db9d6094e6461c837ef90e91142c70ae6 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:57:23 +0530 Subject: [PATCH 35/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2cbee901..a22f90f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From f0e2fc4577fedb39af3074639e447703460ea7e5 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:58:07 +0530 Subject: [PATCH 36/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a22f90f7..2cbee901 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 8afbd4230c4f2a6774b80f4f0928ba95d126297a Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 13:59:18 +0530 Subject: [PATCH 37/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2cbee901..a22f90f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 9838e38e540edc04b05aa7a5f0fb82fa539cb6d8 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:01:05 +0530 Subject: [PATCH 38/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a22f90f7..2cbee901 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 51d0d2d72e3b62285ac143afb36ce48bb25e9e0b Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:02:12 +0530 Subject: [PATCH 39/44] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2cbee901..27d21787 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage ('Check-Git-Secrets') { steps { sh 'rm trufflehog.txt || true' - sh 'sudo trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' + sh 'sudo -S trufflehog git https://github.com/Shubham-Bhingarde/webapp --results=verified > trufflehog.txt' sh 'cat trufflehog.txt' } } From 662ce419cce50f04060c858691383884236c052c Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:19:18 +0530 Subject: [PATCH 40/44] Update Jenkinsfile SAST stage --- Jenkinsfile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 27d21787..462f67a4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,21 +21,12 @@ pipeline { } } - stage ('Source Composition Analysis') { - steps { - sh 'rm owasp* || true' - sh 'wget "https://raw.githubusercontent.com/cehkunal/webapp/master/owasp-dependency-check.sh" ' - sh 'chmod +x owasp-dependency-check.sh' - sh 'bash owasp-dependency-check.sh' - sh 'cat /var/lib/jenkins/OWASP-Dependency-Check/reports/dependency-check-report.xml' - - } - } + stage ('SAST') { steps { withSonarQubeEnv('sonar') { - sh 'mvn sonar:sonar' + sh "mvn clean verify sonar:sonar -Dsonar.projectKey=DevSecOps -Dsonar.projectName='DevSecOps'" sh 'cat target/sonar/report-task.txt' } } From 3a9fbdfb7b3bcb15729d473a5975f5a3b1646311 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:22:15 +0530 Subject: [PATCH 41/44] Update Jenkinsfile --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 462f67a4..55a50aff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,11 @@ pipeline { stage ('SAST') { steps { withSonarQubeEnv('sonar') { - sh "mvn clean verify sonar:sonar -Dsonar.projectKey=DevSecOps -Dsonar.projectName='DevSecOps'" + sh "mvn clean verify sonar:sonar \ + -Dsonar.projectKey=DevSecOps \ + -Dsonar.projectName='DevSecOps' \ + -Dsonar.host.url=http://10.210.12.92:9000 \ + -Dsonar.token=sqp_bf397c7f86688af960d4b6b4f8fe3d7193d9e29b" sh 'cat target/sonar/report-task.txt' } } From 1892f2861bae3e3568bddf5edb5d25db520a8432 Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:25:07 +0530 Subject: [PATCH 42/44] Update Jenkinsfile --- Jenkinsfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 55a50aff..e7e45898 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,14 +25,8 @@ pipeline { stage ('SAST') { steps { - withSonarQubeEnv('sonar') { - sh "mvn clean verify sonar:sonar \ - -Dsonar.projectKey=DevSecOps \ - -Dsonar.projectName='DevSecOps' \ - -Dsonar.host.url=http://10.210.12.92:9000 \ - -Dsonar.token=sqp_bf397c7f86688af960d4b6b4f8fe3d7193d9e29b" + sh "mvn clean verify sonar:sonar -Dsonar.projectKey=DevSecOps -Dsonar.projectName='DevSecOps' -Dsonar.host.url=http://10.210.12.92:9000 -Dsonar.token=sqp_bf397c7f86688af960d4b6b4f8fe3d7193d9e29b" sh 'cat target/sonar/report-task.txt' - } } } From ce9b25b7b09e9a9f4635498f1cb29f58c2a1bf2c Mon Sep 17 00:00:00 2001 From: Shubham Bhingarde <92458532+Shubham-Bhingarde@users.noreply.github.com> Date: Mon, 13 Oct 2025 14:30:39 +0530 Subject: [PATCH 43/44] Update JenkinsFile --- JenkinsFile | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/JenkinsFile b/JenkinsFile index 6981f24a..8b137891 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -1,39 +1 @@ -pipeline { - agent any - tools { - maven 'MAVEN' - } - stages { - stage ('Initialize') { - steps { - sh ''' - echo "PATH = ${PATH}" - echo "M2_HOME = ${M2_HOME}" - ''' - } - } - - stage ('Build') { - steps { - sh 'mvn clean package' - } - } -// stage ('Deploy-To-Tomcat') { -// steps { -// sshagent(['tomcat']) { -// sh 'scp -v -o StrictHostKeyChecking=no target/*.war shubham@192.168.52.128:/home/shubham/prod/apache-tomcat-8.5.78/webapps/webapp.war' -// } -// } -// } - stage ('SCAN for DAST') { - steps { - sh '''#!/bin/bash -command="docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py -t http://192.168.52.128:8080/WebApp -r report.html" - -eval $command -''' - } - } - } - } From 1e6b25f0cc084406f78d6f70a84edf860183f3f5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 09:21:38 +0000 Subject: [PATCH 44/44] Fix Maven build failure with Java 21 Updated the `pom.xml` to use a compatible version of the `maven-war-plugin` (3.4.0). This resolves the API incompatibility issue when building with Java 21. Also, added a `.gitignore` file to exclude the `target` directory from version control. --- .gitignore | 1 + pom.xml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..2f7896d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/pom.xml b/pom.xml index 3909d5ff..81ae9103 100644 --- a/pom.xml +++ b/pom.xml @@ -17,5 +17,12 @@ WebApp + + + org.apache.maven.plugins + maven-war-plugin + 3.4.0 + +