Skip to content

Commit 664de35

Browse files
authored
Merge pull request #141 from WebFuzzing/webgoat-drivers
Webgoat drivers
2 parents ee70c7e + 8110f01 commit 664de35

File tree

26 files changed

+7149
-124
lines changed

26 files changed

+7149
-124
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,3 +355,8 @@ jdk_8_maven/em/external/rest/spring-batch-rest/target
355355
/jdk_8_maven/cs/rest/original/spring-actuator-demo/target
356356
/jdk_8_maven/em/embedded/rest/spring-actuator-demo/target
357357
/jdk_8_maven/em/external/rest/spring-actuator-demo/target
358+
359+
/jdk_21_maven/cs/rest-gui/webgoat/target
360+
/jdk_21_maven/cs/rest-gui/webgoat/tmp
361+
/jdk_21_maven/em/embedded/rest-gui/webgoat/target
362+
/jdk_21_maven/em/external/rest-gui/webgoat/target

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ For simplicity, all schemas are also available as JSON/YML files under the folde
7070
> **IMPORTANT**: More details (e.g., #LOCs and used databases) on these APIs can be found [in this table](statistics/table_emb.md).
7171
7272

73-
### REST: Java/Kotlin (30)
73+
### REST: Java/Kotlin (31)
7474

7575
* **Bibliothek** (MIT), [jdk_17_gradle/cs/rest/bibliothek](jdk_17_gradle/cs/rest/bibliothek), from [https://github.com/PaperMC/bibliothek](https://github.com/PaperMC/bibliothek)
7676

@@ -130,6 +130,8 @@ For simplicity, all schemas are also available as JSON/YML files under the folde
130130

131131
* **User Management** (MIT), [jdk_8_maven/cs/rest/original/user-management](jdk_8_maven/cs/rest/original/user-management), from [https://github.com/andreagiassi/microservice-rbac-user-management](https://github.com/andreagiassi/microservice-rbac-user-management)
132132

133+
* **WebGoat** (GPL), [jdk_21_maven/cs/rest-gui/webgoat](jdk_21_maven/cs/rest-gui/webgoat), from [https://github.com/WebGoat/WebGoat](https://github.com/WebGoat/WebGoat)
134+
133135
* **YouTubeMock** (not-known license), [jdk_8_maven/cs/rest/original/youtube-mock](jdk_8_maven/cs/rest/original/youtube-mock), from [https://github.com/opensourcingapis/YouTubeMock](https://github.com/opensourcingapis/YouTubeMock)
134136

135137

auth/webgoat-auth.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
auth:
2+
- name: user1
3+
loginEndpointAuth:
4+
payloadRaw: "username=testuser&password=testuser"
5+
- name: user2
6+
loginEndpointAuth:
7+
payloadRaw: "username=testuser2&password=testuser"
8+
9+
authTemplate:
10+
loginEndpointAuth:
11+
endpoint: /WebGoat/login
12+
verb: POST
13+
contentType: application/x-www-form-urlencoded
14+
expectCookies: true

dockerfiles/webgoat.dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM amazoncorretto:21-alpine-jdk
2+
3+
COPY ./dist/webgoat-sut.jar .
4+
COPY ./dist/jacocoagent.jar .
5+
6+
7+
8+
9+
COPY ./scripts/dockerize/data/additional_files/webgoat/test.mv.db .
10+
11+
12+
13+
#ENV TOOL="undefined"
14+
#ENV RUN="0"
15+
16+
ENTRYPOINT \
17+
java \
18+
# unfortunately dumponexit is completely unreliable in Docker :(
19+
# -javaagent:jacocoagent.jar=destfile=./jacoco/webgoat__${TOOL}__${RUN}__jacoco.exec,append=false,dumponexit=true \
20+
-javaagent:jacocoagent.jar=output=tcpserver,address=*,port=6300,append=false,dumponexit=false \
21+
-Drunning.in.docker=true -jar webgoat-sut.jar \
22+
--webgoat.port=8080 --webwolf.port=8081 --server.address="0.0.0.0" --spring.profiles.active=dev --spring.datasource.driver-class-name=org.h2.Driver --spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect --spring.jpa.properties.jakarta.persistence.schema-generation.scripts.action=none --spring.sql.init.mode=never --spring.datasource.url="jdbc:h2:file:./test" --spring.datasource.username=sa --spring.datasource.password

dockerfiles/webgoat.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
services:
2+
sut-webgoat:
3+
build:
4+
dockerfile: ./dockerfiles/webgoat.dockerfile
5+
context: ..
6+
# environment:
7+
# TOOL: ${TOOL:-undefined}
8+
# RUN: ${RUN:-0}
9+
ports:
10+
- "${HOST_PORT:-8080}:8080"
11+
- "${JACOCO_PORT:-6300}:6300"
12+
# volumes:
13+
# default env does not work on volumes
14+
# - ${JACOCODIR}:/jacoco
15+

jdk_21_maven/cs/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
<modules>
1515
<module>rest</module>
16+
<module>rest-gui</module>
1617
</modules>
1718

1819

jdk_21_maven/cs/rest-gui/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.evomaster</groupId>
7+
<artifactId>evomaster-benchmark-jdk21-cs</artifactId>
8+
<version>3.4.1-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>evomaster-benchmark-jdk21-cs-rest-gui</artifactId>
12+
<packaging>pom</packaging>
13+
14+
15+
<modules>
16+
<module>webgoat</module>
17+
</modules>
18+
19+
20+
</project>

0 commit comments

Comments
 (0)