Skip to content

Commit 6cd1f94

Browse files
insecure randomness
1 parent a68f248 commit 6cd1f94

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CWE-338/main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const main = () => {
2+
let password = ''
3+
for (let i = 0; i < 8; i++) {
4+
password += Math.floor(Math.random() * 10)
5+
}
6+
return password
7+
}

0 commit comments

Comments
 (0)