Skip to content

Commit

Permalink
Potential fix for code scanning alert no. 23: Insecure randomness
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent e8232af commit 46b1144
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/bank.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as dgraph from "../../src"

import * as crypto from "crypto"
import { setSchema, setup, wait } from "../helper"

const concurrency = 5
Expand Down Expand Up @@ -79,8 +79,8 @@ async function runTxn(): Promise<void> {
let toUid: string

while (true) {
fromUid = uids[Math.floor(Math.random() * uids.length)]
toUid = uids[Math.floor(Math.random() * uids.length)]
fromUid = uids[crypto.randomInt(uids.length)]
toUid = uids[crypto.randomInt(uids.length)]

if (fromUid !== toUid) {
break
Expand Down

0 comments on commit 46b1144

Please sign in to comment.