File tree Expand file tree Collapse file tree
javascript/ql/test/query-tests/Security/CWE-338 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,12 +87,12 @@ function f17() {
8787}
8888
8989function f18 ( ) {
90- var secret = ( o . password = Math . random ( ) ) ;
90+ var secret = ( o . password = Math . random ( ) ) ; // $ Alert
9191}
9292
9393( function ( ) {
9494 var crypto = require ( 'crypto' ) ;
95- crypto . createHmac ( 'sha256' , Math . random ( ) ) ;
95+ crypto . createHmac ( 'sha256' , Math . random ( ) ) ; // $ Alert
9696} ) ( ) ;
9797
9898( function ( ) {
@@ -118,7 +118,7 @@ function uid() {
118118 var my_nice_uid = Math . floor ( Math . random ( ) * 4_000_000_000 ) ; // $ Alert
119119 var liquid = Math . random ( ) ;
120120 var UUID = Math . random ( ) ; // $ Alert
121- var MY_UID = Math . random ( ) ; // NOK OK
121+ var MY_UID = Math . random ( ) ; // $ Alert
122122}
123123
124124function buildPass ( opts , length ) {
@@ -136,4 +136,4 @@ function buildPass(opts, length) {
136136 password += chars [ Math . floor ( Math . random ( ) * chars . length ) ] ; // $ Alert
137137 }
138138 return password ;
139- }
139+ }
You can’t perform that action at this time.
0 commit comments