Skip to content

Commit

Permalink
Fix High/Critical CVEs (#1492)
Browse files Browse the repository at this point in the history
* Fixes issues with tests since Dropwizard upgrade
* Addresses CVEs from #1491
  • Loading branch information
emerkle826 authored Apr 16, 2024
1 parent bb99e2d commit e50c083
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<properties>
<dropwizard.version>2.1.12</dropwizard.version>
<jersey.version>2.35</jersey.version>
<logback.version>1.2.9</logback.version>
<logback.version>1.3.14</logback.version>
<cxf.version>3.4.5</cxf.version>
<shiro.version>1.12.0</shiro.version>
<prometheus.version>0.12.0</prometheus.version>
Expand Down Expand Up @@ -244,7 +244,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.1</version>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
Expand Down Expand Up @@ -288,9 +288,9 @@
<!--test scope -->

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -662,7 +662,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.2.5</version>
<inherited>true</inherited>
<configuration>
<systemPropertyVariables>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import org.apache.cassandra.repair.RepairParallelism;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
Expand Down Expand Up @@ -744,7 +745,8 @@ public void onSuccess(Object ignored) {
public void onFailure(Throwable throwable) {
LOG.error("Executing SegmentRunner failed", throwable);
}
});
},
MoreExecutors.directExecutor());
} catch (ReaperException ex) {
LOG.error("Executing SegmentRunner failed", ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static DiagEventSubscription createDiagEventSubscription(Row row) {
return new DiagEventSubscription(
Optional.of(row.getUUID("id")),
row.getString("cluster"),
Optional.of(row.getString("description")),
Optional.ofNullable(row.getString("description")),
row.getSet("nodes", String.class),
row.getSet("events", String.class),
row.getBool("export_sse"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2424,7 +2424,7 @@ public void theReturnedListOfSubscriptionsIs(List<Map<String, String>> subscript
new DiagEventSubscription(
Optional.empty(),
s.getCluster(),
Optional.of(s.getDescription()),
Optional.ofNullable(s.getDescription()),
s.getNodes(),
s.getEvents(),
s.getExportSse(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ accessControl:
cryptograph:
type: symmetric
systemPropertySecret: REAPER_ENCRYPTION_KEY

persistenceStoragePath: /tmp/reaper/storage/
4 changes: 3 additions & 1 deletion src/server/src/test/resources/cassandra-reaper-at.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ metrics:

cryptograph:
type: symmetric
systemPropertySecret: REAPER_ENCRYPTION_KEY
systemPropertySecret: REAPER_ENCRYPTION_KEY

persistenceStoragePath: /tmp/reaper/storage/
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ metrics:
cryptograph:
type: symmetric
systemPropertySecret: REAPER_ENCRYPTION_KEY

persistenceStoragePath: /tmp/reaper/storage/
4 changes: 3 additions & 1 deletion src/server/src/test/resources/cassandra-reaper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,6 @@ metrics:

cryptograph:
type: symmetric
systemPropertySecret: REAPER_ENCRYPTION_KEY
systemPropertySecret: REAPER_ENCRYPTION_KEY

persistenceStoragePath: /tmp/reaper/storage/

0 comments on commit e50c083

Please sign in to comment.