Skip to content

Commit bc41e35

Browse files
authored
Add Vuln:Add insecurePassword function with warning comment
1 parent c47f48f commit bc41e35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
console.writeline("hello, world!")
2+
3+
function insecurePassword(): string {
4+
// BAD: the random suffix is not cryptographically secure
5+
const suffix = Math.random();
6+
const password = "myPassword" + suffix;
7+
return password;
8+
}

0 commit comments

Comments
 (0)