From 37ddf246b43dccd31e2ea0f6f72805fff0f1a819 Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Mon, 15 Sep 2025 18:52:58 -0400 Subject: [PATCH] use secure random number generation in lieu of (#9320) (#9355) Co-authored-by: lane-wetmore --- ui/mirage/handlers/clients.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/mirage/handlers/clients.js b/ui/mirage/handlers/clients.js index 4e8a73be94..4a8eea08eb 100644 --- a/ui/mirage/handlers/clients.js +++ b/ui/mirage/handlers/clients.js @@ -56,7 +56,8 @@ function getTotalCounts(array) { } function randomBetween(min, max) { - return Math.floor(Math.random() * (max - min + 1) + min); + const secureRandom = crypto.getRandomValues(new Uint32Array(1))[0] * Math.pow(2, -32); + return Math.floor(secureRandom * (max - min + 1) + min); } function generateMountBlock(path, counts) {