45 Commits

Author SHA1 Message Date
Nanne Baars
ec3b9e8aaf
chore: update Java version in README (#2091)
Closes: gh-2072

* chore: add Maven wrapper jar file

This way we don't download it every time from a Maven repository saving some band with.

* chore: remove @authors tag
2025-03-31 21:05:15 +02:00
Nanne Baars
23d6fe6f36
fix: correct number of solved assignments in report card (#2065)
* fix: correct number of solved assignments in report card

Filter the list of assignments to accurately count the number of solved assignments.

Closes: gh-2063

* chore: remove scoreboard code

This is added when we run a CTF challenge during OWASP AppSecEU in 2017. We can remove this code.

Closes: gh-2064
2025-03-11 22:57:49 +01:00
Nanne Baars
55bd0a49db
chore: cleanup IT tests (#2040) 2025-02-28 18:39:23 +01:00
Nanne Baars
00f3538be2
chore: format all code according to SPDX (#2023) 2025-02-16 19:48:05 +01:00
dependabot[bot]
2a5b4385ea
chore: bump com.diffplug.spotless:spotless-maven-plugin (#2006)
Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.41.1 to 2.44.2.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.41.1...maven/2.44.2)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-15 19:52:40 +01:00
Nanne Baars
8e45316638
feat: Introduce Playwright for UI testing
Instead of using Robot Framework which does not run during a `mvn install`. Playwright seems to be the better approach. We can now write them as normal JUnit test and they are executed during a build.

Additionally this PR solves some interesting bugs found during writing Playwright tests:

- A reset of a lesson removes all assignments as a result another user wouldn't see any assignments
- If someone solves an assignment the assignment automatically got solved for a new user since the assignment included the `solved` flag which immediately got copied to new lesson progress.
- Introduction of assignment progress linking a assignment not directly to all users.
2025-01-26 16:59:59 +01:00
dependabot[bot]
a95213757d
chore: bump org.springframework.boot:spring-boot-starter-parent from 3.3.5 to 3.4.0 (#1962) 2024-12-16 20:16:10 +01:00
Nanne Baars
5fc2e0602c
refactor: move plugin messages (#1968) 2024-12-03 22:13:44 +01:00
dependabot[bot]
cf5101a633
chore: bump org.asciidoctor:asciidoctorj from 2.5.13 to 3.0.0 (#1897) 2024-10-26 22:53:43 +02:00
Nanne Baars
ab068901f1
Remove WebGoat session object (#1929)
* refactor: modernize code

* refactor: move to Tomcat

* chore: bump to Spring Boot 3.3.3

* refactor: use Testcontainers to run integration tests

* refactor: lesson/assignment progress

* chore: format code

* refactor: first step into removing base class for assignment

Always been a bit of an ugly construction, as none of the dependencies are clear. The constructors are hidden due to autowiring the base class. This PR removes two of the fields.

As a bonus we now wire the authentication principal directly in the controllers.

* refactor: use authentication principal directly.

* refactor: pass lesson to the endpoints

No more need to get the current lesson set in a session. The lesson is now passed to the endpoints.

* fix: Testcontainers cannot run on Windows host in Github actions.

Since we have Windows specific paths let's run it standalone for now. We need to run these tests on Docker as well (for now disabled)
2024-10-26 10:54:21 +02:00
Nanne Baars
a0b6decf34
Fix report card (#1845)
* fix: report card

Fix and simplify calculation of the number of assignments a user solved.
Rename `UserTracker` to `UserProgress`
Rename `LessonTracker` to `LessonProgress`
Rename tables in database
2024-07-09 20:07:09 +02:00
François Capon
3134f18066
fix: Success if only Smith earn most salary (#1744)
* Update labels

* Update Java

* Update Test

---------

Co-authored-by: René Zubcevic <rene@zubcevic.com>
2024-06-01 10:50:38 +02:00
Nanne Baars
17acef57b4 chore: add pre-commit hooks
chore: add pre-commit hooks

chore: add pre-commit hooks

chore: add pre-commit hooks

chore: add pre-commit hooks
2023-12-06 17:16:24 +01:00
Nanne Baars
87edc7d1db refactor: use AssertJ for testing
Majority of our test cases use AssertJ
2023-12-06 17:16:24 +01:00
Nanne Baars
ae261f201a feat: show directly requested file in requests overview
When a call directly hits a file it is now show up in the requests overview. This helps the user whether an attack from WebGoat actually requested the uploaded file.

Closes: gh-1551
2023-12-04 21:34:16 +01:00
René Zubcevic
d1e44bbc98
Password reset link test condition more strict and move all WebWolf links to /WebWolf (#1645)
* better check on host and port for password reset and make context roots more flexible

* spotless applied

* removed hardcoded /WebGoat from js

* removed hardcoded /WebGoat from js

* fix spotless

* fix scoreboard

* upgrade WebWolf bootstrap version and icons and templates - part 1

* fixed more bootstrap 5 style issues and context path issues

* organized WebSecurityConfig based on latest conventions and added basic support for oauth (more work needed)

* spotless applied

* added mock bean

* requires updates to properties - commented for now

* requires updates to properties - commented for now

* oauth secrets through env values

* user creation after oauth login

* integration test against non default context paths

* adjusted StartupMessage

* add global model element username

* conditionally show login oauth links

* fixed WebWolf login

---------

Co-authored-by: René Zubcevic <rene@Mac-mini-van-Rene.local>
2023-11-14 10:01:59 +01:00
Nanne Baars
a9b1fd66b8
feat: implement JWT jku example (#1552)
Closes #1539
2023-08-08 17:18:22 +02:00
Àngel Ollé Blázquez
ad00119b0d Add Assignment7 Tests 2023-07-18 00:38:23 +02:00
Nanne Baars
ca886b4818
feat: upgrade to Spring Boot version 3 (#1477) 2023-06-04 11:19:47 +02:00
Nanne Baars
5dbe2eaf19 refactor: update challenge code
- Flags are now wired through a Spring config
- Introduced Flag class
- Removed Flags from the FlagController
2023-02-22 11:01:34 +01:00
Nanne Baars
ecfc321f14 feature: Add extra feedback once someone solves JWT refresh lesson differently
One can solve this lesson by using `alg:none` instead of using the refresh token flow. Instead of adding a check to force using the refresh token we opt for giving the user extra feedback.
2023-02-16 20:32:27 +00:00
Àngel Ollé Blázquez
ae081ce319 Add fileserver location (test) 2023-02-15 12:00:54 +00:00
Nanne Baars
bd398e4c09 #1396 Fix templates path for views 2023-02-15 11:58:49 +00:00
Nanne Baars
d2a1546dff
Apply formatting
This will make sure we have a consistent style across our project and the PRs are only concerned with actual changes and no longer about style.
2023-01-04 08:07:23 +01:00
Nanne Baars
b03777d39b Support boolean when parsing the token.
When the admin json element passes as a `boolean`:

```
{
 "admin": true
}
```

the parsing is now successful.
2023-01-04 07:43:18 +01:00
Àngel Ollé Blázquez
256c1dd3aa Renamed to vulnerablecomponents 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
b93c935d6c Renamed to sqlinjection 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
91470b93ea Renamed to pathtraversal 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
37d684fdd3 Renamed to passwordreset 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
4f911c64a1 Renamed to missingac 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
1eff81718b Renamed to httpproxies 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
1c86f465dc Renamed to clientsidefiltering 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
3b330fb328 Renamed to chromedevtools 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
8a35316985 Rename to bypassrestrictions 2022-07-31 22:39:21 +02:00
Àngel Ollé Blázquez
c63345e4ee Rename authbypass 2022-07-31 22:39:21 +02:00
René Zubcevic
4fc03381a8
Label hint tests (#1293)
* label test

* adjusted it test filter

* label test added
2022-07-15 08:17:11 +02:00
René Zubcevic
f8b7ca5c85
Pom update (#1290)
* asciidoctorj update

* pom and suppression updates
2022-07-11 13:28:44 +02:00
René Zubcevic
b32240f96b
owasp top10-2021 (#1235) 2022-04-11 21:12:41 +02:00
Nanne Baars
711649924b
Refactoring (#1201)
* Some initial refactoring

* Make it one application

* Got it working

* Fix problem on Windows

* Move WebWolf

* Move first lesson

* Moved all lessons

* Fix pom.xml

* Fix tests

* Add option to initialize a lesson

This way we can create content for each user inside a lesson. The initialize method will be called when a new user is created or when a lesson reset happens

* Clean up pom.xml files

* Remove fetching labels based on language.

We only support English at the moment, all the lesson explanations are written in English which makes it very difficult to translate. If we only had labels it would make sense to support multiple languages

* Fix SonarLint issues

* And move it all to the main project

* Fix for documentation paths

* Fix pom warnings

* Remove PMD as it does not work

* Update release notes about refactoring

Update release notes about refactoring

Update release notes about refactoring

* Fix lesson template

* Update release notes

* Keep it in the same repo in Dockerhub

* Update documentation to show how the connection is obtained.

Resolves: #1180

* Rename all integration tests

* Remove command from Dockerfile

* Simplify GitHub actions

Currently, we use a separate actions for pull-requests and branch build.
This is now consolidated in one action.
The PR action triggers always, it now only trigger when the PR is
opened and not in draft.
Running all platforms on a branch build is a bit too much, it is better
 to only run all platforms when someone opens a PR.

* Remove duplicate entry from release notes

* Add explicit registry for base image

* Lesson scanner not working when fat jar

When running the fat jar we have to take into account we
are reading from the jar file and not the filesystem. In
this case you cannot use `getFile` for example.

* added info in README and fixed release docker

* changed base image and added ignore file

Co-authored-by: Zubcevic.com <rene@zubcevic.com>
2022-04-09 14:56:12 +02:00
Nanne Baars
42f373d66a Moved Maven multiproject setup 2015-08-11 21:57:12 +02:00
Nanne Baars
c71d774abf Fixed classloading issue when using a jsp in a lesson 2015-06-19 13:52:43 +02:00
nbaars
f140669edf WEB-197 Images referenced in the plans are not changed by the plugin loader 2015-02-23 12:45:19 +01:00
nbaars
450c0f673f Added separate log file for testing purposes 2015-02-10 14:56:02 +01:00
nbaars
bc21a86b68 Fixed hard coded rewriting of html files was fixed on SqlStringInjection
Added testcases for this situation
2015-02-08 14:12:01 +01:00
nbaars
861f3e9d37 Moved loading to separate object. Added a unit test for loading the properties 2015-02-07 12:40:17 +01:00