Skip to content

Commit 7f61cf9

Browse files
authored
Merge pull request #76 from EMResearch/suts-for-wm
Suts for wm
2 parents 543ab43 + d858ce2 commit 7f61cf9

File tree

4,258 files changed

+461077
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,258 files changed

+461077
-37
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ hs_err_pid*
2727
*.iml
2828

2929

30+
js_npm/evomaster-client-js
3031

3132
/temp/
3233
/dist.zip
@@ -257,6 +258,24 @@ dotnet_3/em/embedded/rest/ScsDriver/generated-tests/
257258
/jdk_11_gradle/em/external/rest/reservations-api/build/
258259
/jdk_17_gradle/.gradle/
259260
/jdk_8_maven/em/embedded/graphql/spring-petclinic-graphql/target/
261+
/jdk_17_gradle/cs/rest/bibliothek/build/
262+
/jdk_17_gradle/em/external/rest/bibliothek/build
263+
/jdk_17_maven/cs/grpc/signal-registration/target/
264+
jdk_11_maven/cs/rest/pay-publicapi/target/
265+
jdk_11_maven/em/embedded/rest/pay-publicapi/target/
266+
jdk_11_maven/em/external/rest/ind1/target/
267+
jdk_17_maven/cs/rest/signal-server/event-logger/target/
268+
jdk_17_maven/cs/rest/signal-server/websocket-resources/target/
269+
jdk_17_maven/cs/rest/signal-server/integration-tests/target/
270+
jdk_17_maven/cs/rest/signal-server/service/target/
271+
jdk_17_maven/cs/rest/signal-server/api-doc/target/
272+
jdk_17_maven/em/embedded/rest/signal-server/target/
273+
jdk_17_maven/cs/rest/familie-tilbake/target/
274+
jdk_17_maven/em/embedded/rest/familie-tilbake/target/
275+
jdk_17_maven/cs/rest/familie-ba-sak/target/
276+
jdk_17_maven/cs/rest/tiltaksgjennomforing-api/target/
277+
jdk_17_maven/em/embedded/rest/familie-ba-sak/target/
278+
260279
/jdk_8_maven/em/embedded/grpc/ncs/target/
261280
/jdk_8_maven/em/embedded/grpc/scs/target/
262281
/jdk_8_maven/em/external/grpc/ncs/target/

README.md

Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@
77
[EvoMaster](http://evomaster.org) Benchmark (EMB):
88
a set of web/enterprise applications for scientific research in Software Engineering.
99

10-
We collected several different systems, in different programming languages, like
11-
Java, Kotlin, JavaScript and C#.
10+
We collected several different systems running on the JVM, in different programming languages such as Java and Kotlin.
1211
In this documentation, we will refer to these projects as System Under Test (SUT).
13-
Currently, the SUTs are either _REST_ or _GraphQL_ APIs.
12+
Currently, the SUTs are either _REST_, _GraphQL_ or _RPC_ APIs.
1413

1514
For each SUT, we implemented _driver_ classes, which can programmatically _start_, _stop_ and _reset_ the state of SUT (e.g., data in SQL databases).
1615
As well as enable setting up different properties in a _uniform_ way, like choosing TCP port numbers for the HTTP servers.
1716
If a SUT uses any external services (e.g., a SQL database), these will be automatically started via Docker in these driver classes.
1817

1918

2019
This collection of SUTs was originally assembled for easing experimentation with the fuzzer called [EvoMaster](http://evomaster.org).
21-
However, finding this type of applications is not trivial among open-source projects.
20+
However, finding this type of application is not trivial among open-source projects.
2221
Furthermore, it is not simple to sort out all the technical details on how to set these applications up and start them in a simple, uniform approach.
2322
Therefore, this repository provides the important contribution of providing all these necessary scripts for researchers that need this kind of case study.
2423

@@ -72,6 +71,10 @@ More details (e.g., #LOCs and used databases) on these APIs can be found [in thi
7271

7372
### REST: Java/Kotlin
7473

74+
* Familie Ba Sak (MIT), [jdk_17_maven/cs/rest/familie-ba-sak](jdk_17_maven/cs/rest/familie-ba-sak), from [https://github.com/navikt/familie-ba-sak](https://github.com/navikt/familie-ba-sak)
75+
76+
* Payments Public API (MIT), [jdk_11_maven/cs/rest/pay-publicapi](jdk_11_maven/cs/rest/pay-publicapi), from [https://github.com/alphagov/pay-publicapi](https://github.com/alphagov/pay-publicapi)
77+
7578
* Session Service (not-known license), [jdk_8_maven/cs/rest/original/session-service](jdk_8_maven/cs/rest/original/session-service), from [https://github.com/cBioPortal/session-service](https://github.com/cBioPortal/session-service)
7679

7780
* 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)
@@ -189,11 +192,45 @@ There are 2 main use cases for EMB:
189192
* Run experiments with other tools
190193

191194
Everything can be setup by running the script `scripts/dist.py`.
192-
Note that you will need installed at least JDK 8, JDK 11, NPM and .NET 3.x, as well as Docker.
193-
Also, you will need to setup environment variables like `JAVA_HOME_8` and `JAVA_HOME_11`.
195+
Note that you will need installed at least Maven, Gradle, JDK 8, JDK 11, JDK 17, NPM, as well as Docker.
196+
Also, you will need to setup environment variables like `JAVA_HOME_8`, `JAVA_HOME_11` and `JAVA_HOME_17`.
194197
The script will issue error messages if any prerequisite is missing.
195198
Once the script is completed, all the SUTs will be available under the `dist` folder, and a `dist.zip` will be created as well (if `scripts/dist.py` is run with `True` as input).
196199

200+
Regarding Maven, most-third party dependencies are automatically downloaded from Maven Central.
201+
However, some dependencies are from GitHub, which unfortunately require authentication to be able to download such dependencies.
202+
Unfortunately, they have [no intention](https://github.com/orgs/community/discussions/26634) to fix this huge usability issue :(
203+
In your home folder, you need to create a configuration file for Maven, in particular `.m2/settings.xml`, with the following configurations:
204+
205+
```
206+
<?xml version="1.0" encoding="UTF-8"?>
207+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
208+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
209+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
210+
<servers>
211+
<server>
212+
<id>github</id>
213+
<!-- Old pre Maven 3.9.0 version -->
214+
<username>YOURUSERNAME</username>
215+
<password>???</password>
216+
<!-- New post Maven 3.9.0 version -->
217+
<configuration>
218+
<httpHeaders>
219+
<property>
220+
<name>Authorization</name>
221+
<value>Bearer ???</value>
222+
</property>
223+
</httpHeaders>
224+
</configuration>
225+
</server>
226+
</servers>
227+
</settings>
228+
```
229+
Which configuration to use depends on the version of Maven (it was changed in version 3.9.0).
230+
In latest versions of Maven, you need to create an authorization token in GitHub (see more info directly on [GitHub documentation pages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)), and put it instead of `???`.
231+
232+
233+
197234
[//]: # (There is also a Docker file to run `dist.py`, named `build.dockerfile`.)
198235

199236
[//]: # (It can be built with:)
@@ -210,20 +247,14 @@ Once the script is completed, all the SUTs will be available under the `dist` fo
210247

211248

212249

213-
Note that here the drivers will be built as well besides the SUTs, and the SUT themselves will also have an instrumented version (for white-box testing heuristics) for _EvoMaster_ (this is for JavaScript and .NET, whereas instrumentation for JVM is done at runtime, via an attached JavaAgent).
214-
215250
In the built `dist` folder, the files will be organized as follows:
216-
217-
* For JVM: `<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers will be called `<name>-evomaster-runner.jar`.
251+
`<name>-sut.jar` will be the non-instrumented SUTs, whereas their executable drivers will be called `<name>-evomaster-runner.jar`.
218252
Instrumentation can be done at runtime by attaching the `evomaster-agent.jar` JavaAgent. If you are running experiments with EvoMaster, this will be automatically attached when running experiments with `exp.py` (available in the EvoMaster's repository). Or it can be attached manually with JVM option `-Devomaster.instrumentation.jar.path=evomaster-agent.jar` when starting the driver.
219-
* For NodeJS: under the folder `<name>` (for each NodeJS SUT), the SUT is available under `src`, whereas the instrumented version is under `instrumented`. If the SUT is written in TypeScript, then the compiled version will be under `build`.
220-
* For .NET: currently only the instrumented version is available (WORK IN PROGRESS)
221253

222254

223255

224256
For running experiments with EvoMaster, you can also "start" each driver directly from an IDE (e.g., IntelliJ).
225257
Each of these drivers has a "main" method that is running a REST API (binding on default port 40100), where each operation (like start/stop/reset the SUT) can be called via an HTTP message by EvoMaster.
226-
For JavaScript, you need to use the files `em-main.js` under the `instrumented/em` folders.
227258

228259

229260

@@ -237,18 +268,12 @@ Each folder represents a set of SUTs (and drivers) that can be built using the s
237268
For example, the folder `jdk_8_maven` contains all the SUTs that need JDK 8 and are built with Maven.
238269
On the other hand, the SUTs in the folder `jdk_11_gradle` require JDK 11 and Gradle.
239270

240-
For JVM and .NET, each module has 2 submodules, called `cs` (short for "Case Study") and `em` (short for "EvoMaster").
271+
For thr JVM, each module has 2 submodules, called `cs` (short for "Case Study") and `em` (short for "EvoMaster").
241272
`cs` contains all the source code of the different SUTs, whereas `em` contains all the drivers.
242273
Note: building a top-module will build as well all of its internal submodules.
243274

244-
Regarding JavaScript, unfortunately NodeJS does not have a good handling of multi-module projects.
245-
Each SUT has to be built separately.
246-
However, for each SUT, we put its source code under a folder called `src`, whereas all the code related to the drivers is under `em`.
247-
Currently, both NodeJS `14` and `16` should work on these SUTs.
248-
249-
The driver classes for Java and .NET are called `EmbeddedEvoMasterController`.
250-
For JavaScript, they are in a script file called `app-driver.js`.
251-
Note that Java also a different kind of driver called `ExternalEvoMasterController`.
275+
The driver classes for Java are called `EmbeddedEvoMasterController`.
276+
Note that Java also has a different kind of driver called `ExternalEvoMasterController`.
252277
The difference is that in External the SUT is started on a separated process, and not running in the same JVM of the driver itself.
253278

254279

@@ -292,13 +317,3 @@ Branch *develop* is using the most recent SNAPSHOT version of _EvoMaster_.
292317
As that is not published online, you need to clone its repository, and build
293318
it locally (see its documentation on how to do it).
294319

295-
To handle JavaScript, unfortunately there is the need for some manual settings.
296-
However, it needs to be done just once.
297-
298-
You need to create _symbolic_ link inside `EMB\js_npm` that points to the `evomaster-client-js` folder in _EvoMaster_.
299-
How to do this, depends on the Operating System.
300-
Note that in the following, `<some-path>` should be replaced with the actual real paths of where you cloned the _EvoMaster_ and _EMB_ repositories.
301-
302-
Windows: `mklink /D C:\<some-path>\EMB\js_npm\evomaster-client-js C:\<some-path>\EvoMaster\client-js\evomaster-client-js`
303-
304-
Mac: `ln -s /<some-path>/EvoMaster/client-js/evomaster-client-js /<some-path>/EMB/js_npm/evomaster-client-js`
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
{
2+
"version": "1.4.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "HexHighEntropyString",
31+
"limit": 3.0
32+
},
33+
{
34+
"name": "IbmCloudIamDetector"
35+
},
36+
{
37+
"name": "IbmCosHmacDetector"
38+
},
39+
{
40+
"name": "JwtTokenDetector"
41+
},
42+
{
43+
"name": "KeywordDetector",
44+
"keyword_exclude": ""
45+
},
46+
{
47+
"name": "MailchimpDetector"
48+
},
49+
{
50+
"name": "NpmDetector"
51+
},
52+
{
53+
"name": "PrivateKeyDetector"
54+
},
55+
{
56+
"name": "SendGridDetector"
57+
},
58+
{
59+
"name": "SlackDetector"
60+
},
61+
{
62+
"name": "SoftlayerDetector"
63+
},
64+
{
65+
"name": "SquareOAuthDetector"
66+
},
67+
{
68+
"name": "StripeDetector"
69+
},
70+
{
71+
"name": "TwilioKeyDetector"
72+
}
73+
],
74+
"filters_used": [
75+
{
76+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
77+
},
78+
{
79+
"path": "detect_secrets.filters.common.is_baseline_file",
80+
"filename": ".secrets.baseline"
81+
},
82+
{
83+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
84+
"min_level": 2
85+
},
86+
{
87+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
88+
},
89+
{
90+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
91+
},
92+
{
93+
"path": "detect_secrets.filters.heuristic.is_lock_file"
94+
},
95+
{
96+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
97+
},
98+
{
99+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
100+
},
101+
{
102+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
103+
},
104+
{
105+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
106+
},
107+
{
108+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
109+
},
110+
{
111+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
112+
}
113+
],
114+
"results": {
115+
"openapi/publicapi_spec.json": [
116+
{
117+
"type": "Base64 High Entropy String",
118+
"filename": "openapi/publicapi_spec.json",
119+
"hashed_secret": "0ca33fee4444c18265ffce030b9e327b54f05ae0",
120+
"is_verified": false,
121+
"line_number": 602
122+
}
123+
],
124+
"src/main/java/uk/gov/pay/api/model/CreateCardPaymentRequest.java": [
125+
{
126+
"type": "Base64 High Entropy String",
127+
"filename": "src/main/java/uk/gov/pay/api/model/CreateCardPaymentRequest.java",
128+
"hashed_secret": "0ca33fee4444c18265ffce030b9e327b54f05ae0",
129+
"is_verified": false,
130+
"line_number": 202
131+
}
132+
],
133+
"src/main/java/uk/gov/pay/api/resources/PaymentsResource.java": [
134+
{
135+
"type": "Base64 High Entropy String",
136+
"filename": "src/main/java/uk/gov/pay/api/resources/PaymentsResource.java",
137+
"hashed_secret": "0ca33fee4444c18265ffce030b9e327b54f05ae0",
138+
"is_verified": false,
139+
"line_number": 241
140+
}
141+
],
142+
"src/test/java/uk/gov/pay/api/filter/AuthorizationValidationFilterTest.java": [
143+
{
144+
"type": "Secret Keyword",
145+
"filename": "src/test/java/uk/gov/pay/api/filter/AuthorizationValidationFilterTest.java",
146+
"hashed_secret": "70abceeb20d82fc2d55e8934d1ad05ad17609752",
147+
"is_verified": false,
148+
"line_number": 36
149+
},
150+
{
151+
"type": "Secret Keyword",
152+
"filename": "src/test/java/uk/gov/pay/api/filter/AuthorizationValidationFilterTest.java",
153+
"hashed_secret": "a0936a38d2c31ad225d670f529a82319fc5bb915",
154+
"is_verified": false,
155+
"line_number": 87
156+
}
157+
],
158+
"src/test/resources/config/empty-elevated-accounts-test-config.yaml": [
159+
{
160+
"type": "Secret Keyword",
161+
"filename": "src/test/resources/config/empty-elevated-accounts-test-config.yaml",
162+
"hashed_secret": "3d4478f77d368235803ceb52bbd45b7240e6af62",
163+
"is_verified": false,
164+
"line_number": 48
165+
}
166+
],
167+
"src/test/resources/config/test-config.yaml": [
168+
{
169+
"type": "Secret Keyword",
170+
"filename": "src/test/resources/config/test-config.yaml",
171+
"hashed_secret": "3d4478f77d368235803ceb52bbd45b7240e6af62",
172+
"is_verified": false,
173+
"line_number": 50
174+
}
175+
],
176+
"src/test/resources/pacts/publicapi-connector-get-payment-refund.json": [
177+
{
178+
"type": "Base64 High Entropy String",
179+
"filename": "src/test/resources/pacts/publicapi-connector-get-payment-refund.json",
180+
"hashed_secret": "4c39a6a28507c3d7ea6de26da0bd1d27cff4a4af",
181+
"is_verified": false,
182+
"line_number": 25
183+
}
184+
],
185+
"src/test/resources/pacts/publicapi-ledger-get-one-agreement.json": [
186+
{
187+
"type": "Base64 High Entropy String",
188+
"filename": "src/test/resources/pacts/publicapi-ledger-get-one-agreement.json",
189+
"hashed_secret": "2d893b1b122fa0a884e02bb0a5b20764a80ef6e4",
190+
"is_verified": false,
191+
"line_number": 22
192+
}
193+
]
194+
},
195+
"generated_at": "2023-09-06T14:26:21Z"
196+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GOV.UK Pay contributing guide
2+
3+
This guide covers the basics of how to contribute to the GOV.UK Pay project.
4+
5+
## Pull requests
6+
The team's pull request checklist can be found [here](https://github.com/alphagov/pay-team-manual/blob/master/docs/development-processes/pull-request-checklist.md)
7+
8+
## Contributions from beyond the team
9+
If you have an idea to share or a feature to request to raise please contact the GOV.UK Pay team govuk-pay-support@digital.cabinet-office.gov.uk.
10+
11+
If this is a security issue please do not submit a pull request or raise a GitHub issue, instead, please read the disclosure process [here](/README.md#responsible-disclosure).

0 commit comments

Comments
 (0)