Skip to content

Commit

Permalink
finos#1434 using java.security.SecureRandom to pass code analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
naleeha committed Sep 10, 2024
1 parent e322468 commit 2055a24
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.finos.vuu.net.json.JsonVsSerializer
import org.finos.vuu.net.ws.WebSocketClient
import org.finos.vuu.net.{AlwaysHappyLoginValidator, ViewServerClient, WebSocketViewServerClient}

import java.security.SecureRandom
import scala.util.Random

class TestStartUp(moduleFactoryFunc: () => ViewServerModule)(
Expand All @@ -25,9 +26,10 @@ class TestStartUp(moduleFactoryFunc: () => ViewServerModule)(

lifecycle.autoShutdownHook()

val rand = new Random
val http = rand.between(10011, 10500)
val ws = rand.between(10011, 10500)
val lowerBound = 10011
val rand = new SecureRandom()
val http = rand.nextInt(10500) + lowerBound
val ws = rand.nextInt(10500) + lowerBound

val module: ViewServerModule = moduleFactoryFunc()

Expand Down

0 comments on commit 2055a24

Please sign in to comment.