diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2a9d87637..a05c2d5b6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,41 +1,21 @@
-name: "Build"
-on:
- push:
- branches: [ '*' ]
- tags-ignore:
- - '*'
-
+name: GitHub Actions Demo
+on: [push]
jobs:
- build:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- java: [11, 15]
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v1
- with:
- java-version: ${{ matrix.java }}
- architecture: x64
- - name: Cache Maven packages
- uses: actions/cache@v2.1.4
- with:
- path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
- - name: Build with Maven
- run: mvn clean install
-
- notify-slack:
- if: github.event_name == 'push' && (success() || failure())
- needs:
- - build
+ Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- - name: "Slack workflow notification"
- uses: Gamesight/slack-workflow-status@master
- with:
- repo_token: ${{secrets.GITHUB_TOKEN}}
- slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
\ No newline at end of file
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
+ - name: Check out repository code
+ uses: actions/checkout@v2
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
+ - name: List files in the repository
+ run: |
+ ls ${{ github.workspace }}
+ - run: echo "🍏 This job's status is ${{ job.status }}."
+
+ branches:
+ - master # or the name of your main branch
+
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 000000000..1c85af4ac
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,32 @@
+# This workflow integrates ShiftLeft NG SAST with GitHub
+# Visit https://docs.shiftleft.io for help
+name: ShiftLeft
+
+on:
+ pull_request:
+ workflow_dispatch:
+ push:
+ # We recommend triggering a scan when merging to your default branch as a best practice,
+ # especially if you'd like to compare the results of two scans (e.g., a feature branch against the
+ # default branch)
+ branches:
+ - main
+ - master
+jobs:
+ NextGen-Static-Analysis:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download ShiftLeft CLI
+ run: |
+ curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
+ # ShiftLeft requires Java 1.8. Post the package step override the version
+ - name: Setup Java JDK
+ uses: actions/setup-java@v1.4.3
+ with:
+ java-version: 1.8
+ - name: NextGen Static Analysis
+ run: ${GITHUB_WORKSPACE}/sl analyze --app ShiftLeftJS --tag branch=${{ github.head_ref }} --js --cpg $(pwd)
+ env:
+ SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3b9bf1c46..1af644c2c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,10 +16,10 @@ jobs:
id: tag
uses: dawidd6/action-get-tag@v1
- - name: Set up JDK 11
+ - name: Set up JDK 15
uses: actions/setup-java@v1
with:
- java-version: 11
+ java-version: 15
architecture: x64
- name: Cache Maven packages
@@ -111,10 +111,10 @@ jobs:
ref: develop
token: ${{ secrets.WEBGOAT_DEPLOYER_TOKEN }}
- - name: Set up JDK 11
+ - name: Set up JDK 15
uses: actions/setup-java@v1
with:
- java-version: 11
+ java-version: 15
architecture: x64
- name: Set version to next snapshot
diff --git a/.github/workflows/sonarcloud1.yml b/.github/workflows/sonarcloud1.yml
new file mode 100644
index 000000000..520736ce5
--- /dev/null
+++ b/.github/workflows/sonarcloud1.yml
@@ -0,0 +1,23 @@
+on:
+ # Trigger analysis when pushing in master or pull requests, and when creating
+ # a pull request.
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, synchronize, reopened]
+
+name: SonarCloudHamid
+jobs:
+ sonarqube:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ # Disabling shallow clone is recommended for improving relevancy of reporting
+ fetch-depth: 0
+ - name: SonarQube Scan
+ uses: sonarsource/sonarqube-scan-action@master
+ env:
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
diff --git a/.github/workflows/sonarcuberun1.yml b/.github/workflows/sonarcuberun1.yml
new file mode 100644
index 000000000..a6abacac1
--- /dev/null
+++ b/.github/workflows/sonarcuberun1.yml
@@ -0,0 +1,36 @@
+name: SonarPass12
+on:
+ push:
+ branches:
+ - 891 # or the name of your main branch
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache SonarQube packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=WebGoat
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 000000000..8583f68e5
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,24 @@
+pipeline {
+ agent any
+
+ stages {
+ stage('Do Nothing') {
+ steps {
+ echo 'Doing Nothing..'
+ }
+ }
+ stage('Test Nothing') {
+ steps {
+ echo 'Testing Nothing..'
+ }
+ }
+ stage('Deploy') {
+ steps {
+ echo 'Deploying....'
+ sh '''#!/bin/bash
+ mvn deploy
+ '''
+ }
+ }
+ }
+}
diff --git a/README.MD b/README.MD
index c9e13d645..6077b2bb0 100644
--- a/README.MD
+++ b/README.MD
@@ -38,7 +38,7 @@ Every release is also published on [DockerHub]((https://hub.docker.com/r/webgoat
The easiest way to start WebGoat as a Docker container is to use the all-in-one docker container. This is a docker image that has WebGoat and WebWolf running inside.
```shell
-docker run -p 8080:8080 -p 9090:9090 -e TZ=Europe/Amsterdam webgoat/goatandwolf
+docker run -p 127.0.0.1:8080:8080 -p 127.0.0.1:9090:9090 -e TZ=Europe/Amsterdam webgoat/goatandwolf
```
WebGoat will be located at: http://127.0.0.1:8080/WebGoat
@@ -46,32 +46,6 @@ WebWolf will be located at: http://127.0.0.1:9090/WebWolf
**Important**: Choose the correct timezone, so that the docker container and your host are in the same timezone. As it important for the validity of JWT tokens used in certain exercises.
-### Using docker stack deploy
-
-Another way to deply WebGoat and WebWolf in a more advanced way is to use a compose-file in a docker stack deploy.
-You can define which containers should run in which combinations and define all of this in a yaml file.
-An example of such a file is: [goat-with-reverseproxy.yaml](goat-with-reverseproxy.yaml)
-
-This sets up an nginx webserver as reverse proxy to WebGoat and WebWolf. You can change the timezone by adjusting the value in the yaml file.
-
-```shell
-docker stack init
-docker stack deploy --compose-file goat-with-reverseproxy.yaml webgoatdemo
-```
-
-Add the following entries in your local hosts file:
-
-```shell
-127.0.0.1 www.webgoat.local www.webwolf.localhost
-```
-
-You can use the overall start page: http://www.webgoat.local or:
-
-WebGoat will be located at: http://www.webgoat.local/WebGoat
-
-WebWolf will be located at: http://www.webwolf.local/WebWolf
-
-**Important**: the current directory on your host will be mapped into the container for keeping state.
## 2. Standalone
@@ -82,7 +56,7 @@ java -jar webgoat-server-8.1.0.jar [--server.port=8080] [--server.address=localh
java -jar webwolf-8.1.0.jar [--server.port=9090] [--server.address=localhost]
```
-The latest version of WebGoat needs Java 11 or above. By default WebGoat and WebWolf start on port 8080,9000 and 9090 with the environment variable WEBGOAT_PORT, WEBWOLF_PORT and WEBGOAT_HSQLPORT you can set different values.
+The latest version of WebGoat needs Java 15 or above. By default, WebGoat uses port 8080, the database uses 9000 and WebWolf use port 9090 with the environment variable WEBGOAT_PORT, WEBWOLF_PORT and WEBGOAT_HSQLPORT you can set different values.
```Shell
export WEBGOAT_PORT=18080
export WEBGOAT_HSQLPORT=19001
@@ -90,14 +64,15 @@ export WEBWOLF_PORT=19090
java -jar webgoat-server-8.1.0.jar
java -jar webwolf-8.1.0.jar
```
-Use set in stead of export on Windows cmd.
+
+Use `set` instead of export on Windows cmd.
## 3. Run from the sources
### Prerequisites:
-* Java 11
+* Java 15
* Maven > 3.2.1
* Your favorite IDE
* Git, or Git support in your IDE
@@ -134,13 +109,16 @@ server.address=x.x.x.x
For specialist only. There is a way to set up WebGoat with a personalized menu. You can leave out some menu categories or individual lessons by setting environment variables.
-For instance running as a jar on a Linux/MacOS it will look like:
+For instance running as a jar on a Linux/macOS it will look like:
+
```Shell
export EXCLUDE_CATEGORIES="CLIENT_SIDE,GENERAL,CHALLENGE"
export EXCLUDE_LESSONS="SqlInjectionAdvanced,SqlInjectionMitigations"
java -jar webgoat-server/target/webgoat-server-v8.2.0-SNAPSHOT.jar
```
+
Or in a docker run it would (once this version is pushed into docker hub) look like:
+
```Shell
docker run -d -p 80:8888 -p 8080:8080 -p 9090:9090 -e TZ=Europe/Amsterdam -e EXCLUDE_CATEGORIES="CLIENT_SIDE,GENERAL,CHALLENGE" -e EXCLUDE_LESSONS="SqlInjectionAdvanced,SqlInjectionMitigations" webgoat/goatandwolf
```
diff --git a/build.yml b/build.yml
new file mode 100644
index 000000000..ab8933f70
--- /dev/null
+++ b/build.yml
@@ -0,0 +1,36 @@
+name: Build
+on:
+ push:
+ branches:
+ - master # or the name of your main branch
+
+jobs:
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: Set up JDK 11
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11
+ - name: Cache SonarQube packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v1
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=WebGoat
diff --git a/buildspec.yml b/buildspec.yml
deleted file mode 100644
index 477440e02..000000000
--- a/buildspec.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-version: 0.1
-
-phases:
- build:
- commands:
- - mvn package
-
-artifacts:
- files:
- - webgoat-server/target/webgoat-server-8.0-SNAPSHOT.jar
- discard-paths: yes
-
diff --git a/docker-compose-local.yml b/docker-compose-local.yml
deleted file mode 100644
index d94544473..000000000
--- a/docker-compose-local.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-version: '2.1'
-
-services:
- webgoat:
- image: webgoat/webgoat-v8.0.0.snapshot
- extends:
- file: docker-compose.yml
- service: webgoat
- webwolf:
- extends:
- file: docker-compose.yml
- service: webwolf
- image: webgoat/webwolf-v8.0.0.snapshot
\ No newline at end of file
diff --git a/docker-compose-postgres.yml b/docker-compose-postgres.yml
deleted file mode 100644
index 1eecda57f..000000000
--- a/docker-compose-postgres.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-version: '2.0'
-
-services:
- webgoat:
- image: webgoat/webgoat-8.0
- user: webgoat
- environment:
- - WEBWOLF_HOST=webwolf
- - WEBWOLF_PORT=9090
- - spring.datasource.url=jdbc:postgresql://webgoat_db:5432/webgoat?user=webgoat&password=webgoat
- - spring.datasource.username=webgoat
- - spring.datasource.password=webgoat
- - spring.datasource.driver-class-name=org.postgresql.Driver
- - spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
- - webgoat.server.directory=/home/webgoat/.webgoat/
- - webgoat.user.directory=/home/webgoat/.webgoat/
- ports:
- - "8080:8080"
- webwolf:
- image: webgoat/webwolf
- environment:
- - spring.datasource.url=jdbc:postgresql://webgoat_db:5432/webgoat?user=webgoat&password=webgoat
- - spring.datasource.username=webgoat
- - spring.datasource.password=webgoat
- - spring.datasource.driver-class-name=org.postgresql.Driver
- - spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
- ports:
- - "9090:9090"
- webgoat_db:
- image: postgres:10.12
-# Uncomment to store the state of the database on the host.
-# volumes:
-# - ./database:/var/lib/postgresql
- environment:
- - POSTGRES_PASSWORD=webgoat
- - POSTGRES_USER=webgoat
- - POSTGRES_DB=webgoat
- ports:
- - "5432:5432"
-
diff --git a/docker-compose.yml b/docker-compose.yml
deleted file mode 100644
index 8bf8add95..000000000
--- a/docker-compose.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-version: '3'
-
-services:
- webgoat:
- image: webgoat/webgoat-8.0
- environment:
- - WEBWOLF_HOST=webwolf
- - WEBWOLF_PORT=9090
- - TZ=Europe/Amsterdam
- ports:
- - "8080:8080"
- - "9001:9001"
- volumes:
- - .:/home/webgoat/.webgoat
- working_dir: /home/webgoat
- webwolf:
- image: webgoat/webwolf
- ports:
- - "9090:9090"
- command: --spring.datasource.url=jdbc:hsqldb:hsql://webgoat:9001/webgoat --server.address=0.0.0.0
- depends_on:
- - webgoat
diff --git a/docker/.gitignore b/docker/.gitignore
deleted file mode 100644
index d392f0e82..000000000
--- a/docker/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.jar
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 2f5df2edc..b16e71d4d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,6 +1,6 @@
-FROM openjdk:11.0.1-jre-slim-stretch
+FROM openjdk:15.0.2-slim
-ARG webgoat_version=v8.2.0-SNAPSHOT
+ARG webgoat_version=8.2.0-SNAPSHOT
ENV webgoat_version_env=${webgoat_version}
RUN apt-get update && apt-get install
@@ -14,8 +14,8 @@ USER webgoat
COPY nginx.conf /etc/nginx/nginx.conf
COPY index.html /usr/share/nginx/html/
-COPY webgoat-server-${webgoat_version}.jar /home/webgoat/webgoat.jar
-COPY webwolf-${webgoat_version}.jar /home/webgoat/webwolf.jar
+COPY target/webgoat-server-${webgoat_version}.jar /home/webgoat/webgoat.jar
+COPY target/webwolf-${webgoat_version}.jar /home/webgoat/webwolf.jar
COPY start.sh /home/webgoat
EXPOSE 8080
diff --git a/docker/Readme.md b/docker/Readme.md
index 8e321fa9b..0e6ed7941 100644
--- a/docker/Readme.md
+++ b/docker/Readme.md
@@ -2,8 +2,12 @@
## Docker build
- docker build --no-cache --build-arg webgoat_version=v8.2.0-SNAPSHOT -t webgoat/goatandwolf:latest .
+```shell
+docker build --no-cache --build-arg webgoat_version=8.2.0-SNAPSHOT -t webgoat/goatandwolf:latest .
+```
## Docker run
-
- docker run -d -p 80:8888 -p 8080:8080 -p 9090:9090 -e TZ=Europe/Amsterdam webgoat/goatandwolf:latest
\ No newline at end of file
+
+```shell
+docker run -p 80:8888 -p 8080:8080 -p 9090:9090 -e TZ=Europe/Amsterdam webgoat/goatandwolf:latest
+```
\ No newline at end of file
diff --git a/docker/pom.xml b/docker/pom.xml
index 224610dde..70ee16e14 100644
--- a/docker/pom.xml
+++ b/docker/pom.xml
@@ -18,14 +18,14 @@
org.apache.maven.pluginsmaven-antrun-plugin
- 1.8
+ 3.0.0install
-
-
+
+
diff --git a/docker/start.sh b/docker/start.sh
index 30a7d0955..26798f2b5 100644
--- a/docker/start.sh
+++ b/docker/start.sh
@@ -3,10 +3,14 @@
cd /home/webgoat
service nginx start
sleep 1
+echo "Starting WebGoat..."
java -Duser.home=/home/webgoat -Dfile.encoding=UTF-8 -jar webgoat.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webgoat.log &
sleep 10
-
+
+echo "Starting WebWolf..."
java -Duser.home=/home/webgoat -Dfile.encoding=UTF-8 -jar webwolf.jar --webgoat.build.version=$1 --server.address=0.0.0.0 > webwolf.log &
+echo "Browse to http://localhost" to get started >> webgoat.log
+
tail -300f webgoat.log
diff --git a/docs/README.md b/docs/README.md
index dde40936b..34c67ffa1 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,5 +1,5 @@
# WebGoat landing page
-Old Github page which now redirects to OWASP website.
+Old Github page which now redirects to OWASP website. Tester
diff --git a/goat-with-reverseproxy.yaml b/goat-with-reverseproxy.yaml
deleted file mode 100644
index bad613258..000000000
--- a/goat-with-reverseproxy.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-version: '3'
-networks:
- webwolflocal:
-services:
- webgoat:
- hostname: www.webgoat.local
- image: webgoat/webgoat-8.0
- environment:
- - WEBGOAT_PORT=8080
- - WEBGOAT_SSLENABLED=false
- - WEBWOLF_HOST=webwolf
- - WEBWOLF_PORT=9090
- - TZ=Europe/Amsterdam
- volumes:
- - .:/home/webgoat/.webgoat
- working_dir: /home/webgoat
- command: --server.address=0.0.0.0
- networks:
- webwolflocal:
- aliases:
- - goat.webgoat.local
- webwolf:
- image: webgoat/webwolf
- environment:
- - WEBWOLF_HOST=webwolf
- - WEBWOLF_PORT=9090
- - TZ=Europe/Amsterdam
- command: --spring.datasource.url=jdbc:hsqldb:hsql://webgoat:9001/webgoat --server.address=0.0.0.0
- networks:
- webwolflocal:
- aliases:
- - wolf.webwolf.local
- depends_on:
- - webgoat
- reverseproxy:
- hostname: www.webwolf.local
- image: webgoat/reverseproxy
- networks:
- webwolflocal:
- aliases:
- - www.webwolf.local
- ports:
- - 80:80
diff --git a/jenkinsfile b/jenkinsfile
new file mode 100644
index 000000000..a72fe3150
--- /dev/null
+++ b/jenkinsfile
@@ -0,0 +1,21 @@
+pipeline {
+ agent any
+
+ stages {
+ stage('Build') {
+ steps {
+ sh mvn package
+ }
+ }
+ stage('Test') {
+ steps {
+ echo 'Testing..'
+ }
+ }
+ stage('Deploy') {
+ steps {
+ echo 'Deploying....'
+ }
+ }
+ }
+}
diff --git a/platformQuickStarts/AWS/README.md b/platformQuickStarts/AWS/README.md
deleted file mode 100644
index 762bdda12..000000000
--- a/platformQuickStarts/AWS/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# AWS
-
-- This contains the various platform Quick Starts for Getting WebGoat Deployed into AWS.
-- This IaaS quickstart uses AWS CloudFormation to perform most of the provisioning
-- This IaaS quickstart is composed of three independent bundles
- - Code pipeline and Build
- - Deploying to EC2
- - Deploying to ECS
-
-
-It is Assumed:
-- You have an AWS Account
-- You know what an S3 bucket is
-- You have seen the IAM console and have permissions to create IAM Roles
-
-
-
-
-## Code Pipeline and Build
-
-This Quickstart is for those that just want to perform builds with AWS. It Triggers off of Github to perform builds of `webgoat-server`
-
-
-
-## EC2
-
-(WIP) This uses AWS CodePipeline, CodeBuild, and CodeDeploy to land WebGoat to Running EC2 instances
-
-## ECS
-
-(WIP) This uses AWS CodePipeline, CodeBuild, ECR, to land a container onto an ECS cluster
\ No newline at end of file
diff --git a/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codebuild.json b/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codebuild.json
deleted file mode 100644
index 2fbf17f5a..000000000
--- a/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codebuild.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "AWSTemplateFormatVersion": "2010-09-09",
- "Description": "IAM Roles for Code Build WebGoat IaaS Quickstart",
- "Parameters": {
- "qsS3BucketName": {
- "Description": "Name of the S3 Bucket for artifacts",
- "Type": "String",
- "MinLength": "1"
- },
- "qsRoleName": {
- "Description": "Name of the IAM role that CodeBuild Will Use",
- "Type": "String",
- "Default": "SimpleCodeBuildRole",
- "MinLength": "1"
- }
- },
- "Resources": {
- "qsCodeBuildRole": {
- "Type": "AWS::IAM::Role",
- "Properties": {
- "AssumeRolePolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Service": [
- "codebuild.amazonaws.com"
- ]
- },
- "Action": [
- "sts:AssumeRole"
- ]
- }
- ]
- },
- "Path": "/webgoat/",
- "RoleName": {
- "Ref": "qsRoleName"
- },
- "ManagedPolicyArns": [
- "arn:aws:iam::aws:policy/AWSCodeCommitFullAccess",
- "arn:aws:iam::aws:policy/AWSCodeBuildDeveloperAccess",
- "arn:aws:iam::aws:policy/AWSCodeDeployDeployerAccess"
- ],
- "Policies": [
- {
- "PolicyName": "CloudWatchLogs",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Resource": [
- {"Fn::Join": [ "",["arn:aws:logs:*:", { "Ref": "AWS::AccountId" }, ":log-group:/aws/codebuild*" ] ]}
- ],
- "Action": [
- "logs:CreateLogGroup",
- "logs:CreateLogStream",
- "logs:PutLogEvents"
- ]
- }
- ]
- }
- },
- {
- "PolicyName": "S3buckets",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "qsS3BucketName"
- },
- "*"
- ]
- ]
- },
- "arn:aws:s3:::codepipeline-*"
- ],
- "Action": [
- "s3:Put*",
- "s3:Get*",
- "s3:List*"
- ]
- }
- ]
- }
- }
- ]
- }
- }
- }
-}
diff --git a/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codepipeline.json b/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codepipeline.json
deleted file mode 100644
index 58fd9f1f4..000000000
--- a/platformQuickStarts/AWS/codepipelinebuild/01_IAM_codepipeline.json
+++ /dev/null
@@ -1,127 +0,0 @@
-{
- "AWSTemplateFormatVersion": "2010-09-09",
- "Description": "IAM Role for Code Pipeline WebGoat IaaS Quickstart",
- "Parameters": {
- "qsS3BucketName": {
- "Description": "Name of the S3 Bucket for artifacts",
- "Type": "String",
- "MinLength": "1"
- },
- "qsRoleName": {
- "Description": "Name of the IAM role that CodePipeline Will Use",
- "Type": "String",
- "Default": "SimpleCodePipelineRole",
- "MinLength": "1"
- }
- },
- "Resources": {
- "qsCodePipelineRole": {
- "Type": "AWS::IAM::Role",
- "Properties": {
- "AssumeRolePolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "",
- "Effect": "Allow",
- "Principal": {
- "Service": "codepipeline.amazonaws.com"
- },
- "Action": "sts:AssumeRole"
- }
- ]
- },
- "Path": "/webgoat/",
- "RoleName": {
- "Ref": "qsRoleName"
- },
- "ManagedPolicyArns": [
- "arn:aws:iam::aws:policy/AWSCodeCommitFullAccess",
- "arn:aws:iam::aws:policy/AWSCodeBuildDeveloperAccess",
- "arn:aws:iam::aws:policy/AWSCodeDeployDeployerAccess"
- ],
- "Policies": [
- {
- "PolicyName": "CloudWatchLogsPipeline",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Resource": [
- {"Fn::Join": [ "",["arn:aws:logs:*:", { "Ref": "AWS::AccountId" }, ":log-group:/aws/*" ] ]}
- ],
- "Action": [
- "logs:CreateLogGroup",
- "logs:CreateLogStream",
- "logs:PutLogEvents"
- ]
- }
- ]
- }
- },
- {
- "PolicyName": "MiscComputeOpen",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Resource": "*",
- "Action": [
- "lambda:InvokeFunction",
- "lambda:ListFunctions",
- "elasticbeanstalk:*",
- "ec2:*",
- "elasticloadbalancing:*",
- "autoscaling:*",
- "cloudwatch:*",
- "s3:*",
- "sns:*",
- "cloudformation:*",
- "rds:*",
- "sqs:*",
- "ecs:*",
- "iam:PassRole"
- ]
- }
- ]
- }
- },
- {
- "PolicyName": "S3buckets",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "qsS3BucketName"
- },
- "*"
- ]
- ]
- },
- "arn:aws:s3:::codepipeline-*",
- "arn:aws:s3:::elasticbeanstalk*"
- ],
- "Action": [
- "s3:Put*",
- "s3:Get*",
- "s3:List*"
- ]
- }
- ]
- }
- }
- ]
- }
- }
- }
-}
diff --git a/platformQuickStarts/AWS/codepipelinebuild/01_codepiplinebuild.yml b/platformQuickStarts/AWS/codepipelinebuild/01_codepiplinebuild.yml
deleted file mode 100644
index 8aac7af2a..000000000
--- a/platformQuickStarts/AWS/codepipelinebuild/01_codepiplinebuild.yml
+++ /dev/null
@@ -1,123 +0,0 @@
-AWSTemplateFormatVersion: "2010-09-09"
-
-Description: >
- AWS Cloud Formation for creating an AWS CodePipeline that checks a git repo for changes and then performs a build using code build
-
-
-Parameters:
- qsPipelineName:
- Description: The name of the AWS Code Pipeline
- Type: String
- Default: WG-pipeline
- MinLength: 1
- qsPipelineRoleARN:
- Description: The complete ARN to the IAM role that code pipeline should use
- Type: String
- MinLength: 1
- qsCodeRepo:
- Description: The Repository
- Type: String
- MinLength: 1
- qsRepoBranch:
- Description: The Branch in the Repository
- Type: String
- MinLength: 1
- qsGitHubUser:
- Description: The GitHub User Id
- Type: String
- MinLength: 1
- qsGitHubAPIToken:
- Description: The GitHub Personal Access token do not use password
- NoEcho: true
- Type: String
- MinLength: 1
- qsS3PipelineArtifacts:
- Description: Where Code Pipeline will state artifacts in S3
- Type: String
- MinLength: 1
- qsS3CodeBuildArtifacts:
- Description: Where Code Build will upload Artifacts can be same as codepipeline
- Type: String
- MinLength: 1
- qsCodeBuildName:
- Description: Name of the AWS Code Build
- Type: String
- Default: WG-mvnBuilder
- MinLength: 1
- qsKMSKeyARN:
- Description: The KMS ARN that the IAM Role is allowed to use
- Type: String
- MinLength: 1
- qsCodeRoleArn:
- Description: The IAM Role ARN for CodePipeline and CodeDeploy
- Type: String
- MinLength: 1
-
-
-
-Resources:
-
-
-
-
- stkcbrCodeBuild:
- Type: AWS::CodeBuild::Project
- Properties:
- Artifacts:
- Type: CODEPIPELINE
- Description: Builds WebGoat Jar using build file in repo
- EncryptionKey: !Ref 'qsKMSKeyARN'
- Environment:
- ComputeType: BUILD_GENERAL1_SMALL
- Image: aws/codebuild/java:openjdk-8
- Type: LINUX_CONTAINER
- Name: !Ref 'qsCodeBuildName'
- ServiceRole: !Ref 'qsCodeRoleArn'
- TimeoutInMinutes: 10
- Source:
- Type: CODEPIPELINE
-
-
-
- stkcplPipeline:
- Type: AWS::CodePipeline::Pipeline
- Properties:
- Name: !Ref 'qsPipelineName'
- RoleArn: !Ref 'qsPipelineRoleARN'
- ArtifactStore:
- Location: !Ref 'qsS3PipelineArtifacts'
- Type: S3
- Stages:
- - Name: CodeRepo
- Actions:
- - Name: CodeSource
- ActionTypeId:
- Category: Source
- Owner: ThirdParty
- Provider: GitHub
- Version: 1
- Configuration:
- Branch: !Ref 'qsRepoBranch'
- Repo: !Ref 'qsCodeRepo'
- Owner: !Ref 'qsGitHubUser'
- OAuthToken: !Ref 'qsGitHubAPIToken'
- OutputArtifacts:
- - Name: MySource
- RunOrder: '1'
- - Name: Build
- Actions:
- - Name: CodeBuild
- ActionTypeId:
- Category: Build
- Owner: AWS
- Provider: CodeBuild
- Version: 1
- InputArtifacts:
- - Name: MySource
- Configuration:
- ProjectName: !Ref stkcbrCodeBuild
- OutputArtifacts:
- - Name: MyBuild
- RunOrder: '2'
-
-
diff --git a/platformQuickStarts/AWS/codepipelinebuild/README.md b/platformQuickStarts/AWS/codepipelinebuild/README.md
deleted file mode 100644
index e8aea2d06..000000000
--- a/platformQuickStarts/AWS/codepipelinebuild/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Serverless MVN builds Featuring AWS
-
-This Quick Start forms the basis for the other AWS quickstarts. This only BUILDS the `webgoat-server` spring boot jar. If you want to also run it on AWS skip to the other AWS quickstarts
-
-Before you Begin
-1. Do you have an AWS Account?
-2. Can you create an S3 Bucket?
-3. Can you create a KMS Key?
-4. Do you know what Cloud Formation is?
-5. Do you have enough permissions to do any real work in said AWS Account?
-
-If you said no to any of those...hop over to [docs](https://aws.amazon.com/documentation/) and learn (but don't do) how to create those.
-
-
-You will also need:
-1. A GitHub Account
-2. Fork of WebGoat
-3. Personal access Token with `Admin:repo_hook` and `repo`
-
-
-
-## Create Pre-requisites
-
-First pick an AWS region and stick with it for ALL the quickstarts. This one was mostly executed on US-east-1/2 but any region with KMS, CodePipeline, and CodeBuild will work. eu-Central-1, ap-southeast-1 and sa-east-1 have reported success also.
-
-
-1. Create an S3 bucket and call it something meaningfull like `webgoat-stash-username` or something or use an existing bucket you have access to.
-2. Create a KMS Key. Make sure you are a key administrator so you can add key users later.
-
-## Deploy IAM role Cloud Formation Stacks
-
-In this folder there are two json cloudformation templates:
--`01_IAM_codebuild.json`
--`01_IAM_codepipeline.json`
-
-You will use the CloudFormation templates to create two roles. One for CodePipeline and the Other for CodeBuild. You will use the name of the bucket you just created as a parameter.
-
-## Update KMS Key
-
-Access the KMS key you created earlier...add the two IAM roles you just created and Key Users
-
-## Finally the Pipeline
-
-You will use the yaml cloudformation template `01_codepiplinebuild.yml` to create the code building pipeline.
-
-Some of the parameters you will need to pass:
-1. The S3 bucket (twice)
-2. The Github Branch name (master? develop? yourbranchname?)
-3. The Github user (if you forked it would be your username)
-4. You personal access token for GitHub
-5. The name or the repo (WebGoat! ...unless you renamed and did a whole bunch of fancy git magic)
-6. The ARN of the KMS key
-7. The ARN of the role for the codebuild for parameter qsCodeRoleArn
-8. The ARN for codepipeline
-
-If this Stack successfully deploys a build will begin based on the latest commit automatically. You will have a funky named zip file (without the .zip ending) in a folder in the S3 bucket in a few minutes.
-
-
-
-Congratulations. You just Deployed a two step AWS Codepipeline that looks for codechanges and then performs a build.
-
-... ON to the next AWS Quickstart
-
-
diff --git a/platformQuickStarts/GCP/GKE-Docker/README.md b/platformQuickStarts/GCP/GKE-Docker/README.md
deleted file mode 100644
index 7b18993c1..000000000
--- a/platformQuickStarts/GCP/GKE-Docker/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# GKE - DockerHub
-
-This Quickstart shows how to create a Kubernettes Cluster using Google Cloud Platform's [GKE](https://cloud.google.com/container-engine/) and WebGoat's Docker [Image](https://hub.docker.com/r/webgoat/webgoat-8.0/).
-
-To be Successfull with this Quickstart
-
-1. You have a Google Cloud Platform account and have enough access rights to create Compute Engine and Container Engine Resources
-2. You know how to `git clone`
-3. You have the gcloud SDK install and initialized somewhere ( do not use the google cloud shell)
-
-
-Remeber to perform a 'gcloud auth login' before using the gcloud commands below.
-
-
-
-## Create Kubernettes Cluster
-
-You can create a cluster using the Google Cloud Console. The Default settings will suffice. For this QuickStart the cluster name used is `owaspbasiccluster`. The `PROJECTNAME` is whatever your project is. The `REGION` is a region/zone near you.
-
-If you want to use the gcloud sdk from a properly initialized gcloud commandline environment use the following command
-
-
-```
-gcloud container --project "PROJECTNAME" clusters create "owaspbasiccluster" --zone "REGION" --machine-type "n1-standard-1" --image-type "COS" --disk-size "100" --scopes "https://www.googleapis.com/auth/compute","https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append","https://www.googleapis.com/auth/source.read_only" --num-nodes "3" --network "default" --enable-cloud-logging --no-enable-cloud-monitoring
-
-
-```
-
-The command creates a similar cluster with more of the options set explicitly.
-
-## Set up Kubectl
-
-Using the commandline gcloud SDK environment you need to set-up 'kubectl'
-
-If you have not already installed 'Kubectl' you can do so with the following command using `gcloud`
-- `gcloud components install kubectl`
-
-Then you just run:
-- `gcloud container clusters get-credentials owaspbasiccluster --zone REGION --project PROJECTNAME`
-
-
-## Deploy WebGoat Deployment
-
-Time to deploy the latest DockerImage for WebGoat!
-
-
-Let's First Make a namespace for this:
-- `kubectl create namespace webgoat`
-
-Now it is time to make the magic happen!
-
-- `kubectl create -f /where_you_git_cloned_webgoat/platformQuickStart/GCP/GKE-Docker/webgoat_noDNSnoTLS.yml`
-
-This should complete with no errors.
-
-Use the following command to see information/status about the deployment
-- `kubectl describe deployment webgoat-dpl --namespace=webgoat`
-
-After a few minutes the service endpoint should be ready. You can check the status with
-- `kubectl describe service webgoatsvc --namespace=webgoat`
-
-In the output you should see a message like "Created load..." after a "Creating load..." which means that the public facing loadbalancer (even thou there is just one container running!) is ready.
-
-
-If you want to see the Kubernetes dashboard you can run `kubectl proxy` (in a new terminal window) and then navigate to http://localhost:8001/ui .
-
-
-
-## Test Deployment
-
-From the previous `describe service` command the `LoadBalancer Ingress:` line should have the external IP. The line below should give the port.
-
-So.....
-
-[IP]:[PORT]/WebGoat in your browser!
-
-DONE
-
-
-
diff --git a/platformQuickStarts/GCP/GKE-Docker/deploy.cfg b/platformQuickStarts/GCP/GKE-Docker/deploy.cfg
deleted file mode 100644
index 460110cc2..000000000
--- a/platformQuickStarts/GCP/GKE-Docker/deploy.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-CURTAG=webgoat/webgoat-8.0
-DEST_TAG=gcr.io/astech-training/raging-wire-webgoat
-CLUSTER_NAME=raging-wire-webgoat
-PORT_NUM=8080
\ No newline at end of file
diff --git a/platformQuickStarts/GCP/GKE-Docker/gke-deploy-config.sh b/platformQuickStarts/GCP/GKE-Docker/gke-deploy-config.sh
deleted file mode 100644
index 87a076730..000000000
--- a/platformQuickStarts/GCP/GKE-Docker/gke-deploy-config.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-CURTAG=webgoat/webgoat-8.0
-DEST_TAG=gcr.io/your-gke-project/your-webgoat-tag
-CLUSTER_NAME=your-cluster-name
-PORT_NUM=8080
\ No newline at end of file
diff --git a/platformQuickStarts/GCP/GKE-Docker/webgoat_deployment_noDNSnoTLS.yml b/platformQuickStarts/GCP/GKE-Docker/webgoat_deployment_noDNSnoTLS.yml
deleted file mode 100644
index 228cf29ef..000000000
--- a/platformQuickStarts/GCP/GKE-Docker/webgoat_deployment_noDNSnoTLS.yml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-apiVersion: v1
-kind: Service
-metadata:
- labels:
- app: webgoatapp
- name: webgoatsvc
- namespace: webgoat
-spec:
- ports:
- -
- port: 8080
- protocol: TCP
- selector:
- app: webgoatapp
- type: LoadBalancer
----
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: webgoat-dpl
- namespace: webgoat
-spec:
- replicas: 1
- template:
- metadata:
- name: webgoatapp
- labels:
- app: webgoatapp
- spec:
- containers:
- -
- image: webgoat/webgoat-8.0
- name: webgoat
- ports:
- -
- containerPort: 8080
-
-
\ No newline at end of file
diff --git a/platformQuickStarts/GCP/README.md b/platformQuickStarts/GCP/README.md
deleted file mode 100644
index 1c4eb30cb..000000000
--- a/platformQuickStarts/GCP/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# WebGoat on GCP!
-
-This folder contains sub folders for the various ways you could deploy WebGoat on Google Cloud Platform
-
-It is assumed:
-1. You have a Google Cloud Platform Account
-2. You can use Git
-3. You can use a Linux/Mac/Google Cloud Shell
-
-
-## GKE Docker
-
-Uses GKE to run the latest DockerHub version of WebGoat8
-
-## AppEngine
-
-WIP
\ No newline at end of file
diff --git a/platformQuickStarts/README.md b/platformQuickStarts/README.md
deleted file mode 100644
index f647f3273..000000000
--- a/platformQuickStarts/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# OWASP WebGoat Platform Quick Starts
-
-Want to Run WebGoat? Want to run WebGoat in the Cloud? Don't want to be cloud Expert?
-
-Do we have a solution for you!
-
-
-Additionally, Each IaaS/PaaS will have their deployment steps broken down giving the *app-guy-new-to-cloud* an opportunity to learn how said platform works.
-
-
-
-## AWS
-
-Multi-Part Quickstart. Starts with simple pipeline that just builds code to a deploying onto EC2 instances and then containers using ECS/ECR
-
-## GCP
-
-Get WebGoat Running on GKE and AppEngine
-
-
-
-
diff --git a/pom.xml b/pom.xml
index 2c27c7f8f..8897dd591 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,6 +13,10 @@
2006https://github.com/WebGoat/WebGoat
+
+ 3.2.5
+
+
OWASPhttps://github.com/WebGoat/WebGoat/
@@ -115,8 +119,8 @@
UTF-8UTF-8
- 11
- 11
+ 15
+ 15build
@@ -134,6 +138,7 @@
3.1.13.1.03.0.0-M4
+ 15
@@ -188,16 +193,17 @@
org.apache.maven.pluginsmaven-compiler-plugin
+ ${maven-compiler-plugin.version}
- 11
- 11
+ 15
+ 15UTF-8org.apache.maven.pluginsmaven-checkstyle-plugin
- 3.1.0
+ 3.1.2UTF-8true
@@ -212,7 +218,7 @@
maven-pmd-plugin3.14.0
- 11
+ 151
@@ -243,7 +249,7 @@
org.owaspdependency-check-maven
- 5.3.2
+ 6.1.37true
@@ -287,5 +293,12 @@
-
+
+
+ snapshots
+ Artifactory West-snapshots
+ http://35.236.103.251:8081/artifactory/hamid-maven-one-libs-snapshot-local
+
+
+
diff --git a/scripts/build-all.sh b/scripts/build-all.sh
deleted file mode 100755
index 319854ac2..000000000
--- a/scripts/build-all.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-
-cd ..
-
-nc -zv 127.0.0.1 8080 2>/dev/null
-SUCCESS=$?
-nc -zv 127.0.0.1 9090 2>/dev/null
-SUCCESS=${SUCCESS}$?
-
-if [[ "${SUCCESS}" -eq 0 ]] ; then
- echo "WebGoat and or WebWolf are still running, please stop them first otherwise unit tests might fail!"
- exit 127
-fi
-
-
-sh mvnw clean install
-if [[ "$?" -ne 0 ]] ; then
- exit y$?
-fi
-
-cd -
-sh build_docker.sh
-if [[ "$?" -ne 0 ]] ; then
- exit y$?
-fi
-
-while true; do
- read -p "Do you want to run docker-compose?" yn
- case ${yn} in
- [Yy]* ) sh clean-run-docker-compose.sh; break;;
- [Nn]* ) exit;;
- * ) echo "Please answer yes or no.";;
- esac
-done
diff --git a/scripts/build_docker.sh b/scripts/build_docker.sh
deleted file mode 100644
index ec5f28d9f..000000000
--- a/scripts/build_docker.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-WEBGOAT_HOME=$(pwd)/../
-
-cd "${WEBGOAT_HOME}"/webgoat-server
-docker build -t webgoat/webgoat-v8.0.0.snapshot .
-
-cd "${WEBGOAT_HOME}"/webwolf
-docker build -t webgoat/webwolf-v8.0.0.snapshot .
-
diff --git a/scripts/clean-run-docker-compose.sh b/scripts/clean-run-docker-compose.sh
deleted file mode 100644
index b1e493b87..000000000
--- a/scripts/clean-run-docker-compose.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-cd ..
-docker-compose rm -f
-docker-compose -f docker-compose-local.yml up
diff --git a/scripts/deploy-webgoat.sh b/scripts/deploy-webgoat.sh
deleted file mode 100644
index 3f9dfa4d4..000000000
--- a/scripts/deploy-webgoat.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-docker login -u $DOCKER_USER -p $DOCKER_PASS
-
-export REPO=webgoat/goatandwolf
-cd ..
-cd docker
-ls target/
-
-if [ ! -z "${TRAVIS_TAG}" ]; then
- # If we push a tag to master this will update the LATEST Docker image and tag with the version number
- docker build --build-arg webgoat_version=${TRAVIS_TAG:1} -f Dockerfile -t $REPO:latest -t $REPO:${TRAVIS_TAG} .
- docker push $REPO
-else
- echo "Skipping releasing to DockerHub because it is a build of branch ${BRANCH}"
-fi
diff --git a/scripts/run-docker-compose.sh b/scripts/run-docker-compose.sh
deleted file mode 100644
index 4ed58bcf0..000000000
--- a/scripts/run-docker-compose.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd ..
-docker-compose up
diff --git a/scripts/start.sh b/scripts/start.sh
deleted file mode 100644
index 3380882af..000000000
--- a/scripts/start.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-DATABASE_PORT=9001
-
-checkDatabaseAvailable(){
-
- #for i in $(seq 1 5); do command && s=0 && break || s=$? && sleep 15; done; (exit $s)
- local started = $(netstat -lnt | grep ${DATABASE_PORT})
- echo $?
-}
-
-#java -Djava.security.egd=file:/dev/./urandom -jar home/webgoat/webgoat.jar --server.address=0.0.0.0
-$(checkDatabaseAvailable)
-
-
-#java -Djava.security.egd=file:/dev/./urandom -jar /home/webwolf/webwolf.jar --server.port=9090 --server.address=0.0.0.0
-
-
diff --git a/webgoat-container/pom.xml b/webgoat-container/pom.xml
index 33cbd19cc..96d0ca51d 100644
--- a/webgoat-container/pom.xml
+++ b/webgoat-container/pom.xml
@@ -70,7 +70,7 @@
org.asciidoctorasciidoctorj
- 1.5.8.1
+ 2.4.3org.springframework.boot
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java
index d965c2454..91613c309 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java
@@ -1,18 +1,22 @@
package org.owasp.webgoat.asciidoc;
-import java.util.Map;
-
-import org.asciidoctor.ast.AbstractBlock;
+import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.extension.InlineMacroProcessor;
+import java.util.Map;
+
public class OperatingSystemMacro extends InlineMacroProcessor {
+ public OperatingSystemMacro(String macroName) {
+ super(macroName);
+ }
+
public OperatingSystemMacro(String macroName, Map config) {
super(macroName, config);
}
@Override
- public String process(AbstractBlock parent, String target, Map attributes) {
+ public Object process(ContentNode contentNode, String target, Map attributes) {
return System.getProperty("os.name");
}
}
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java
index 845815d9f..3310a22fe 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java
@@ -1,17 +1,22 @@
package org.owasp.webgoat.asciidoc;
-import org.asciidoctor.ast.AbstractBlock;
+import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.extension.InlineMacroProcessor;
+
import java.util.Map;
public class WebGoatTmpDirMacro extends InlineMacroProcessor {
+ public WebGoatTmpDirMacro(String macroName) {
+ super(macroName);
+ }
+
public WebGoatTmpDirMacro(String macroName, Map config) {
super(macroName, config);
}
@Override
- public String process(AbstractBlock parent, String target, Map attributes) {
+ public String process(ContentNode contentNode, String target, Map attributes) {
return EnvironmentExposure.getEnv().getProperty("webgoat.server.directory");
}
}
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java
index b736f4afe..8029ab0fd 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java
@@ -1,17 +1,22 @@
package org.owasp.webgoat.asciidoc;
-import org.asciidoctor.ast.AbstractBlock;
+import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.extension.InlineMacroProcessor;
+
import java.util.Map;
public class WebGoatVersionMacro extends InlineMacroProcessor {
+ public WebGoatVersionMacro(String macroName) {
+ super(macroName);
+ }
+
public WebGoatVersionMacro(String macroName, Map config) {
super(macroName, config);
}
@Override
- public String process(AbstractBlock parent, String target, Map attributes) {
+ public String process(ContentNode contentNode, String target, Map attributes) {
return EnvironmentExposure.getEnv().getProperty("webgoat.build.version");
}
}
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java
index d78d62765..40b1ba555 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java
@@ -1,6 +1,6 @@
package org.owasp.webgoat.asciidoc;
-import org.asciidoctor.ast.AbstractBlock;
+import org.asciidoctor.ast.ContentNode;
import org.asciidoctor.extension.InlineMacroProcessor;
import org.springframework.core.env.Environment;
import org.springframework.web.context.request.RequestContextHolder;
@@ -17,12 +17,16 @@
*/
public class WebWolfMacro extends InlineMacroProcessor {
+ public WebWolfMacro(String macroName) {
+ super(macroName);
+ }
+
public WebWolfMacro(String macroName, Map config) {
super(macroName, config);
}
@Override
- public String process(AbstractBlock parent, String target, Map attributes) {
+ public String process(ContentNode contentNode, String target, Map attributes) {
Environment env = EnvironmentExposure.getEnv();
String hostname = determineHost(env.getProperty("webwolf.host"), env.getProperty("webwolf.port"));
diff --git a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java
index b188c2a66..7491af6fb 100644
--- a/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java
+++ b/webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java
@@ -10,6 +10,10 @@
*/
public class WebWolfRootMacro extends WebWolfMacro {
+ public WebWolfRootMacro(String macroName) {
+ super(macroName);
+ }
+
public WebWolfRootMacro(String macroName, Map config) {
super(macroName, config);
}
diff --git a/webgoat-images/vagrant-training/Vagrantfile b/webgoat-images/vagrant-training/Vagrantfile
deleted file mode 100644
index cb086a0c1..000000000
--- a/webgoat-images/vagrant-training/Vagrantfile
+++ /dev/null
@@ -1,35 +0,0 @@
-# Setup a Linux box headless which will start WebGoat and WebWolf helpful image to give away during training
-
-Vagrant.configure(2) do |config|
- config.vm.box = "ubuntu/trusty64"
- config.vm.network :forwarded_port, guest: 8080, host: 8080
- config.vm.network :forwarded_port, guest: 9090, host: 9090
- config.vm.provider "virtualbox" do |vb|
- vb.gui = false
- vb.memory = "4096"
- vb.cpus = 2
- vb.name = "WebGoat-Training"
- vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
- end
- config.vm.provider "vmware_fusion" do |vf|
- vf.gui = false
- vf.vmx["memsize"] = 4096
- vf.vmx["numvcpus"] = 2
- vf.vmx["displayname"] = "WebGoat-Training"
- end
-
- config.vm.provision "shell", inline: <<-SHELL
- wget https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M25/webgoat-server-8.0.0.M25.jar
- wget https://github.com/WebGoat/WebGoat/releases/download/v8.0.0.M25/webwolf-8.0.0.M25.jar
- sudo add-apt-repository ppa:openjdk-r/ppa
- sudo apt-get update
- sudo apt-get install openjdk-11-jre -y
- SHELL
-
- config.vm.provision "shell", run: "always", privileged: false, inline: <<-SHELL
- java -jar webgoat-server-8.0.0.M25.jar --server.address=0.0.0.0 &
- sleep 40s
- java -jar webwolf-8.0.0.M25.jar --server.address=0.0.0.0 &
- SHELL
-
-end
diff --git a/webgoat-integration-tests/pom.xml b/webgoat-integration-tests/pom.xml
index 0690413d4..c5b095eae 100644
--- a/webgoat-integration-tests/pom.xml
+++ b/webgoat-integration-tests/pom.xml
@@ -18,7 +18,7 @@
io.github.bonigarciawebdrivermanager
- 4.2.2
+ 4.3.1test
diff --git a/webgoat-lessons/challenge/pom.xml b/webgoat-lessons/challenge/pom.xml
index accce8025..874053493 100644
--- a/webgoat-lessons/challenge/pom.xml
+++ b/webgoat-lessons/challenge/pom.xml
@@ -14,7 +14,7 @@
io.jsonwebtokenjjwt
- 0.7.0
+ 0.9.1org.springframework.boot
@@ -24,7 +24,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/cross-site-scripting/pom.xml b/webgoat-lessons/cross-site-scripting/pom.xml
index 1b72ff455..7a0171373 100644
--- a/webgoat-lessons/cross-site-scripting/pom.xml
+++ b/webgoat-lessons/cross-site-scripting/pom.xml
@@ -13,7 +13,7 @@
org.jsoupjsoup
- 1.11.3
+ 1.13.1
diff --git a/webgoat-lessons/html-tampering/pom.xml b/webgoat-lessons/html-tampering/pom.xml
index fd06dd7cc..5478f4126 100755
--- a/webgoat-lessons/html-tampering/pom.xml
+++ b/webgoat-lessons/html-tampering/pom.xml
@@ -18,7 +18,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/insecure-deserialization/pom.xml b/webgoat-lessons/insecure-deserialization/pom.xml
index 9e462d155..7db02049a 100755
--- a/webgoat-lessons/insecure-deserialization/pom.xml
+++ b/webgoat-lessons/insecure-deserialization/pom.xml
@@ -18,7 +18,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/insecure-login/pom.xml b/webgoat-lessons/insecure-login/pom.xml
index 5c4dd18b6..73f64d793 100755
--- a/webgoat-lessons/insecure-login/pom.xml
+++ b/webgoat-lessons/insecure-login/pom.xml
@@ -18,7 +18,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/jwt/pom.xml b/webgoat-lessons/jwt/pom.xml
index b86dff4d7..9add3ad70 100644
--- a/webgoat-lessons/jwt/pom.xml
+++ b/webgoat-lessons/jwt/pom.xml
@@ -13,12 +13,12 @@
io.jsonwebtokenjjwt
- 0.7.0
+ 0.9.1org.springframework.securityspring-security-test
- 4.1.3.RELEASE
+ 5.4.5test
diff --git a/webgoat-lessons/password-reset/pom.xml b/webgoat-lessons/password-reset/pom.xml
index 574c22f32..f4aa1f5f2 100644
--- a/webgoat-lessons/password-reset/pom.xml
+++ b/webgoat-lessons/password-reset/pom.xml
@@ -13,7 +13,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/pom.xml b/webgoat-lessons/pom.xml
index c1ab7af78..fad8120f3 100644
--- a/webgoat-lessons/pom.xml
+++ b/webgoat-lessons/pom.xml
@@ -71,7 +71,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
@@ -85,31 +84,4 @@
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${maven-surefire-plugin.version}
-
- 0
- true
-
- --illegal-access=permit
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
- 11
- 11
- UTF-8
-
-
-
-
diff --git a/webgoat-lessons/secure-passwords/pom.xml b/webgoat-lessons/secure-passwords/pom.xml
index 950cb26c3..8d1e26787 100644
--- a/webgoat-lessons/secure-passwords/pom.xml
+++ b/webgoat-lessons/secure-passwords/pom.xml
@@ -13,7 +13,7 @@
com.nulab-inczxcvbn
- 1.2.5
+ 1.4.0
\ No newline at end of file
diff --git a/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java b/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java
index 89ca589eb..ed6642baa 100644
--- a/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java
+++ b/webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java
@@ -78,7 +78,7 @@ public AttackResult injectableQuery(String accountName) {
String appendingWhenSucceded;
if (usedUnion)
- appendingWhenSucceded = "Well done! Can you also figure out a solution, by appending a new Sql Statement?";
+ appendingWhenSucceded = "Well done! Can you also figure out a solution, by appending a new SQL Statement?";
else
appendingWhenSucceded = "Well done! Can you also figure out a solution, by using a UNION?";
results.last();
diff --git a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc
index eaa85f902..63ea9e834 100644
--- a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc
+++ b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc
@@ -46,7 +46,7 @@ The UNION ALL Syntax also allows duplicate Values.
=== Joins
-The Join operator is used to combine rows from two ore more tables, based on a related column
+The Join operator is used to combine rows from two or more tables, based on a related column
[source]
-----
diff --git a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc
index b7bd0b165..1ed75d232 100644
--- a/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc
+++ b/webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc
@@ -9,7 +9,7 @@ injection.
Let us first start with the difference between a normal SQL injection and a blind SQL injection. In a normal
SQL injection the error messages from the database are displayed and gives enough information to find out how
-the query is working. Or in the case of an UNION based SQL injection the application does not reflect the information
+the query is working. Or in the case of a UNION based SQL injection the application does not reflect the information
directly on the web page. So in the case where nothing is displayed you will need to start asking the database questions
based on a true or false statement. That is why a blind SQL injection is much more difficult to exploit.
@@ -18,7 +18,7 @@ There are several different types of blind SQL injections: content-based and tim
=== Example
-In this case we are trying to ask the database a boolean question based on for example an unique id, for example
+In this case we are trying to ask the database a boolean question based on a unique id, for example
suppose we have the following url: `https://my-shop.com?article=4`
On the server side this query will be translated as follows:
@@ -39,7 +39,7 @@ If the browser responds with a page not found or something else you know a blind
You can now change the SQL query and test for example: `https://shop.example.com?article=4 AND 1=2` which will not return
anything because the query returns false.
-So but how do we actually take advantage of this? Above we only asked the database for trivial question but you can
+How do we actually take advantage of this? Above we only asked the database a trivial question but you can
for example also use the following url: `https://shop.example.com?article=4 AND substring(database_version(),1,1) = 2`
Most of the time you start by finding which type of database is used, based on the type of database you can find
@@ -50,8 +50,8 @@ system tables cannot be queried with the user used to connect from the web appli
Another way is called a time-based SQL injection, in this case you will ask the database to wait before returning
-the result. You might need to use this if you are totally blind so there is no difference between the response you
-can use for example:
+the result. You might need to use this if you are totally blind. This means there is no difference between the response data.
+To achieve this kind of SQL injection you could use:
----
article = 4; sleep(10) --
diff --git a/webgoat-lessons/ssrf/pom.xml b/webgoat-lessons/ssrf/pom.xml
index 48a85a78b..15242416c 100755
--- a/webgoat-lessons/ssrf/pom.xml
+++ b/webgoat-lessons/ssrf/pom.xml
@@ -18,7 +18,6 @@
org.springframework.securityspring-security-test
- 4.1.3.RELEASEtest
diff --git a/webgoat-lessons/vulnerable-components/pom.xml b/webgoat-lessons/vulnerable-components/pom.xml
index 97ded9f15..827c349c1 100644
--- a/webgoat-lessons/vulnerable-components/pom.xml
+++ b/webgoat-lessons/vulnerable-components/pom.xml
@@ -12,22 +12,22 @@
com.thoughtworks.xstreamxstream
- 1.4.5
+ 1.4.5cglibcglib-nodep
- 2.2
+ 2.2antant-launcher
- 1.6.2
+ 1.6.5antant
- 1.6.2
+ 1.6.5xml-resolver
diff --git a/webgoat-lessons/xxe/pom.xml b/webgoat-lessons/xxe/pom.xml
index 263fef6cd..3e2e87a39 100644
--- a/webgoat-lessons/xxe/pom.xml
+++ b/webgoat-lessons/xxe/pom.xml
@@ -24,7 +24,7 @@
com.github.tomakehurstwiremock
- 2.8.0
+ 2.27.2test
diff --git a/webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java b/webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java
index b5d09c582..ae94abffe 100644
--- a/webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java
+++ b/webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java
@@ -2,10 +2,8 @@
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
import com.github.tomakehurst.wiremock.verification.LoggedRequest;
import org.hamcrest.CoreMatchers;
-import org.junit.Rule;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -19,13 +17,8 @@
import java.io.File;
import java.util.List;
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.findAll;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
-import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
diff --git a/webwolf/pom.xml b/webwolf/pom.xml
index fa45cb3e8..dffb992f9 100644
--- a/webwolf/pom.xml
+++ b/webwolf/pom.xml
@@ -39,7 +39,7 @@
org.bitbucket.b_cjose4j
- 0.7.2
+ 0.7.6org.springframework.boot
@@ -84,12 +84,12 @@
org.webjarsbootstrap
- 3.3.7
+ 5.0.0-beta3org.webjarsjquery
- 3.2.1
+ 3.6.0org.hsqldb
@@ -115,15 +115,6 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 11
- 11
- UTF-8
-
- org.springframework.bootspring-boot-maven-plugin
@@ -143,16 +134,6 @@
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- never
-
- --illegal-access=permit
-
-
-