This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1716 from matthewdunsdon/CVE-2020-15250
fix(#1713): CVE-2020-15250 (Medium) detected in junit-4.12.jar
- Loading branch information
Showing
23 changed files
with
252 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...atahelix/generator/orchestrator/cucumber/testframework/steps/CombinationStrategyStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2019 Scott Logic Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.scottlogic.datahelix.generator.orchestrator.cucumber.testframework.steps; | ||
|
||
import com.scottlogic.datahelix.generator.core.config.detail.CombinationStrategyType; | ||
import io.cucumber.java.ParameterType; | ||
|
||
import java.util.Arrays; | ||
|
||
public class CombinationStrategyStep { | ||
@ParameterType(name = "combinationStrategy", value = "(.*)$") | ||
public CombinationStrategyType defineCombinationStrategy(String value) { | ||
return Arrays.stream(CombinationStrategyType.values()) | ||
.filter(val -> val.toString().equalsIgnoreCase(value)) | ||
.findFirst().orElse(CombinationStrategyType.PINNING); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...gic/datahelix/generator/orchestrator/cucumber/testframework/steps/DataGenerationStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright 2019 Scott Logic Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.scottlogic.datahelix.generator.orchestrator.cucumber.testframework.steps; | ||
|
||
import com.scottlogic.datahelix.generator.core.config.detail.DataGenerationType; | ||
import com.scottlogic.datahelix.generator.orchestrator.cucumber.testframework.utils.CucumberGenerationMode; | ||
import io.cucumber.java.ParameterType; | ||
|
||
import java.util.Arrays; | ||
|
||
public class DataGenerationStep { | ||
@ParameterType(name = "generationStrategy", value = "(.*)$") | ||
public DataGenerationType defineGenerationStrategy(String value) { | ||
return Arrays.stream(DataGenerationType.values()) | ||
.filter(val -> val.toString().equalsIgnoreCase(value)) | ||
.findFirst().orElse(DataGenerationType.FULL_SEQUENTIAL); | ||
} | ||
|
||
@ParameterType(name = "generationMode", value = "(.*)$") | ||
public CucumberGenerationMode defineGenerationMode(String value) { | ||
return Arrays.stream(CucumberGenerationMode.values()) | ||
.filter(val -> val.toString().equalsIgnoreCase(value)) | ||
.findFirst().orElse(CucumberGenerationMode.VALIDATING); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...cottlogic/datahelix/generator/orchestrator/cucumber/testframework/steps/OperatorStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2019 Scott Logic Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.scottlogic.datahelix.generator.orchestrator.cucumber.testframework.steps; | ||
|
||
import com.scottlogic.datahelix.generator.profile.dtos.constraints.ConstraintType; | ||
import io.cucumber.java8.En; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
public class OperatorStep implements En { | ||
|
||
public OperatorStep() { | ||
Set<ConstraintType> allOperators = new HashSet<>(Arrays.asList(ConstraintType.values())); | ||
String regex = this.getHumanReadableOperationRegex(allOperators); | ||
|
||
ParameterType("operator", regex, this::extractConstraint); | ||
} | ||
|
||
private String getHumanReadableOperationRegex(Set<ConstraintType> types) { | ||
return | ||
types.stream() | ||
.map(act -> act.propertyName.replaceAll("([a-z])([A-Z]+)", "$1 $2").toLowerCase()) | ||
.collect(Collectors.joining("|", "(", ")")); | ||
} | ||
|
||
private String extractConstraint(String gherkinConstraint) { | ||
List<String> allConstraints = Arrays.asList(gherkinConstraint.split(" ")); | ||
return allConstraints.get(0) + allConstraints | ||
.stream() | ||
.skip(1) | ||
.map(value -> value.substring(0, 1).toUpperCase() + value.substring(1)) | ||
.collect(Collectors.joining()); | ||
} | ||
} |
Oops, something went wrong.