Skip to content

Commit

Permalink
removed vulnerable dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertAvemarg committed Feb 11, 2025
1 parent 7614f7f commit 414d724
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions config/neodymium.properties
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ neodymium.lighthouse.assert.thresholdScore.bestPractices = 0.5
neodymium.lighthouse.assert.thresholdScore.seo = 0.5

# To be able to validate Lighthouse report audits, we use internal json id's from the report itself
# A full list of all audit id's and their corresponding titles can be found here: https://github.com/Xceptance/neodymium/wiki/Reports#lighthouse-audit-validation
# A full list of all audit id's and their corresponding titles can be found here: https://github.com/Xceptance/neodymium/wiki/Accessibility#lighthouse-audit-validation
#neodymium.lighthouse.assert.audits =

#############################
Expand Down Expand Up @@ -416,4 +416,3 @@ neodymium.report.showSelenideErrorDetails = false
#
# The delay between two checks for a popup in milliseconds
#neodymium.popupInterval = 1000

6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.9.0</version>
<exclusions>
<exclusion>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xceptance/neodymium/util/DataUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class DataUtils

private static final Map<Thread, Boolean> ALLURE_ALL_DATA_USED_FLAG = Collections.synchronizedMap(new WeakHashMap<>());

private final static Configuration JSONPATH_CONFIGURATION = Configuration.builder().jsonProvider(new GsonJsonProvider(GSON))
public final static Configuration JSONPATH_CONFIGURATION = Configuration.builder().jsonProvider(new GsonJsonProvider(GSON))
.mappingProvider(new GsonMappingProvider(GSON)).build();

static Boolean getAllureAllDataUsedFlag()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

import io.qameta.allure.Allure;

import static com.xceptance.neodymium.util.DataUtils.JSONPATH_CONFIGURATION;

/**
* Powered by <a href="https://developer.chrome.com/docs/lighthouse/overview?hl=de">Lighthouse</a> (Copyright Google)
* <p>
Expand Down Expand Up @@ -254,8 +256,7 @@ private static void validateAudits(File json, String reportName) throws Exceptio

try
{
int value = JsonPath.read(json, jsonPath);

long value = JsonPath.using(JSONPATH_CONFIGURATION).parse(json).read(jsonPath);
if (value > 0)
{
errorAudits.add(audit.trim());
Expand Down

0 comments on commit 414d724

Please sign in to comment.