Skip to content

Commit a1ee08d

Browse files
Potential fix for code scanning alert no. 327: Insecure randomness
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent cfe281d commit a1ee08d

File tree

1 file changed

+2
-1
lines changed
  • packages/integration-tests/src/test-projects/seed-test-project/amplify/seed

1 file changed

+2
-1
lines changed

packages/integration-tests/src/test-projects/seed-test-project/amplify/seed/seed.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Amplify.configure(outputFile);
2727
const dataClient = generateClient<Schema>();
2828

2929
const username1 = '[email protected]';
30-
const password1 = `T3st_Passw0rd*${Math.random()}`;
30+
const randomSuffix = crypto.randomBytes(4).toString('hex');
31+
const password1 = `T3st_Passw0rd*${randomSuffix}`;
3132

3233
const user1 = await createAndSignUpUser({
3334
username: username1,

0 commit comments

Comments
 (0)