diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 696cb3a7f..3b2f9aae3 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1 @@
-custom: https://owasp.org/donate/?reponame=www-project-webgoat&title=OWASP+WebGoat
\ No newline at end of file
+custom: https://owasp.org/donate/?reponame=www-project-webgoat&title=OWASP+WebGoat
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 28d0b0bc6..f2ea9477f 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -12,4 +12,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"
-
diff --git a/.github/workflows/branchbuild.txt b/.github/workflows/branchbuild.txt
index 33ced2de9..e6cd84d6d 100644
--- a/.github/workflows/branchbuild.txt
+++ b/.github/workflows/branchbuild.txt
@@ -51,4 +51,4 @@ jobs:
file: ./Dockerfile_desktop
push: false
build-args: |
- webgoat_version=${{ env.WEBGOAT_MAVEN_VERSION }}
+ webgoat_version=${{ env.WEBGOAT_MAVEN_VERSION }}
diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml
new file mode 100644
index 000000000..35af733bf
--- /dev/null
+++ b/.github/workflows/pre-commit.yaml
@@ -0,0 +1,29 @@
+name: Pre-commit check
+
+on:
+ pull_request:
+ branches: [main]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+jobs:
+ pre-commit:
+ name: Pre-commit check
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout git repository
+ uses: actions/checkout@v4
+ - name: Setup python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.9"
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Pre-commit checks
+ uses: pre-commit/action@v3.0.0
+ - name: pre-commit-ci-lite
+ uses: pre-commit-ci/lite-action@v1.0.1
+ if: always()
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cc87c2e81..6196dce05 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -46,7 +46,7 @@ jobs:
files: |
target/webgoat-${{ env.WEBGOAT_MAVEN_VERSION }}.jar
body: |
- ## Version ${{ github.ref_name }}
+ ## Version ${{ github.ref_name }}
### New functionality
@@ -55,8 +55,8 @@ jobs:
### Bug fixes
- [#743 - Character encoding errors](https://github.com/WebGoat/WebGoat/issues/743)
-
- Full change log: https://github.com/WebGoat/WebGoat/compare/${{ github.ref_name }}...${{ github.ref_name }}
+
+ Full change log: https://github.com/WebGoat/WebGoat/compare/${{ github.ref_name }}...${{ github.ref_name }}
## Contributors
@@ -147,4 +147,3 @@ jobs:
github_token: "${{ secrets.GITHUB_TOKEN }}"
title: ${{ github.event.commits[0].message }}
target_branch: main
-
diff --git a/.gitignore b/.gitignore
index f914d3ab7..06de08b13 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,4 +56,4 @@ TestClass.class
**/*.flattened-pom.xml
/.gitconfig
-webgoat.gitconfig
\ No newline at end of file
+webgoat.gitconfig
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..b49ff10dc
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,28 @@
+ci:
+ autofix_commit_msg: |
+ [pre-commit.ci] auto fixes from pre-commit.com hooks
+ autofix_prs: false # managed in the action step
+ autoupdate_branch: ""
+ autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
+ autoupdate_schedule: weekly
+ skip: []
+ submodules: false
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: check-yaml
+ - id: end-of-file-fixer
+ exclude: ^(README.md|CREATE_RELEASE.md)
+ - id: trailing-whitespace
+ - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
+ rev: v9.5.0
+ hooks:
+ - id: commitlint
+ stages: [commit-msg]
+ - repo: https://github.com/ejba/pre-commit-maven
+ rev: v0.3.4
+ hooks:
+ - id: maven
+ args: [ 'clean compile' ]
+ - id: maven-spotless-apply
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index bed6f51c0..2e72cb505 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -16,4 +16,4 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, B
Getting Source ==============
-Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software projects.
\ No newline at end of file
+Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software projects.
diff --git a/CREATE_RELEASE.md b/CREATE_RELEASE.md
index fa1244b37..fc22906f0 100644
--- a/CREATE_RELEASE.md
+++ b/CREATE_RELEASE.md
@@ -11,11 +11,11 @@ Update the release notes with the correct version. Use `git shortlog -s -n --sin
committers. In order to fetch the list of issues included use: `git log --graph --pretty='%C(auto)%d%Creset%s' v2023.4..origin/main`
```
-mvn versions:set
+mvn versions:set
<< update release notes >>
mvn verify
git commit ....
-git tag v2023.01
+git tag v2023.01
git push --tags
```
diff --git a/FAQ.md b/FAQ.md
index 3e2968344..db652e04f 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -5,4 +5,3 @@
### Integration tests fail
Try to run the command in the console `java -jar ...` and remove `-Dlogging.pattern.console=` from the command line.
-
diff --git a/LICENSE.txt b/LICENSE.txt
index 573d2b4eb..cb10f880d 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -16,4 +16,4 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, B
Getting Source ==============
-Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software projects.
\ No newline at end of file
+Source for this application is maintained at https://github.com/WebGoat/WebGoat, a repository for free software projects.
diff --git a/README_I18N.md b/README_I18N.md
index 6a4769f1e..1286421c4 100644
--- a/README_I18N.md
+++ b/README_I18N.md
@@ -16,19 +16,19 @@ The following steps are required when you want to add a new language
1. Update [main_new.html](src/main/resources/webgoat/static/main_new.html)
1. Add the parts for showing the flag and providing the correct value for the flag= parameter
-2.
-3. Add a flag image to src/main/resources/webgoat/static/css/img
+ 2.
+2. Add a flag image to src/main/resources/webgoat/static/css/img
1. See the main_new.html for a link to download flag resources
-4. Add a welcome page to the introduction lesson
+3. Add a welcome page to the introduction lesson
1. Copy Introduction_.adoc to Introduction_es.adoc (if in this case you want to add Spanish)
2. Add a highlighted section that explains that most parts of WebGoat will still be in English and invite people to translate parts where it would be valuable
-5. Translate the main labels
+4. Translate the main labels
1. Copy messages.properties to messages_es.properties (if in this case you want to add Spanish)
2. Translate the label values
-6. Optionally translate lessons by
+5. Optionally translate lessons by
1. Adding lang specifc adoc files in documentation folder of the lesson
2. Adding WebGoatLabels.properties of a specific language if you want to
-7. Run mvn clean to see if the LabelAndHintIntegration test passes
-8. Run WebGoat and verify that your own language and the other languages work as expected
+6. Run mvn clean to see if the LabelAndHintIntegration test passes
+7. Run WebGoat and verify that your own language and the other languages work as expected
If you only want to translate more for a certain language, you only need to do step 4-8
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 0c29bfccb..6a2842d6e 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -215,4 +215,3 @@ Special thanks to the following contributors providing us with a pull request:
And everyone who provided feedback through Github.
Team WebGoat
-
diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml
index 6ce36f4e1..6ad83bb0f 100644
--- a/config/checkstyle/suppressions.xml
+++ b/config/checkstyle/suppressions.xml
@@ -8,4 +8,4 @@
-
\ No newline at end of file
+
diff --git a/docs/README.md b/docs/README.md
index 6f0484341..10ddf6f04 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,4 +1,3 @@
# WebGoat landing page
Old GitHub page which now redirects to OWASP website.
-
diff --git a/docs/index.html b/docs/index.html
index 78d11aff2..73e60fd44 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -11,4 +11,4 @@
The page been moved to https://owasp.org/www-project-webgoat/