@@ -164,7 +164,7 @@ private module NodeJSCrypto {
164164      exists ( DataFlow:: SourceNode  mod  | 
165165        mod  =  DataFlow:: moduleImport ( "crypto" )  and 
166166        this  =  mod .getAMemberCall ( "create"  +  [ "Hash" ,  "Hmac" ,  "Sign" ,  "Cipher" ] )  and 
167-         algorithm .matchesName ( getArgument ( 0 ) .getStringValue ( ) ) 
167+         algorithm .matchesName ( this . getArgument ( 0 ) .getStringValue ( ) ) 
168168      ) 
169169    } 
170170
@@ -190,15 +190,15 @@ private module NodeJSCrypto {
190190    } 
191191
192192    override  CryptographicAlgorithm  getAlgorithm ( )  { 
193-       result .matchesName ( getArgument ( 0 ) .getStringValue ( ) ) 
193+       result .matchesName ( this . getArgument ( 0 ) .getStringValue ( ) ) 
194194    } 
195195
196196    override  int  getSize ( )  { 
197197      symmetric  =  true  and 
198-       result  =  getOptionArgument ( 1 ,  "length" ) .getIntValue ( ) 
198+       result  =  this . getOptionArgument ( 1 ,  "length" ) .getIntValue ( ) 
199199      or 
200200      symmetric  =  false  and 
201-       result  =  getOptionArgument ( 1 ,  "modulusLength" ) .getIntValue ( ) 
201+       result  =  this . getOptionArgument ( 1 ,  "modulusLength" ) .getIntValue ( ) 
202202    } 
203203
204204    override  predicate  isSymmetricKey ( )  {  symmetric  =  true  } 
@@ -212,7 +212,7 @@ private module NodeJSCrypto {
212212
213213    override  CryptographicAlgorithm  getAlgorithm ( )  {  none ( )  } 
214214
215-     override  int  getSize ( )  {  result  =  getArgument ( 0 ) .getIntValue ( )  } 
215+     override  int  getSize ( )  {  result  =  this . getArgument ( 0 ) .getIntValue ( )  } 
216216
217217    override  predicate  isSymmetricKey ( )  {  none ( )  } 
218218  } 
@@ -224,7 +224,7 @@ private module NodeJSCrypto {
224224      this  =  instantiation .getAMethodCall ( any ( string  m  |  m  =  "update"  or  m  =  "write" ) ) .asExpr ( ) 
225225    } 
226226
227-     override  Expr  getInput ( )  {  result  =  getArgument ( 0 )  } 
227+     override  Expr  getInput ( )  {  result  =  this . getArgument ( 0 )  } 
228228
229229    override  CryptographicAlgorithm  getAlgorithm ( )  {  result  =  instantiation .getAlgorithm ( )  } 
230230  } 
@@ -365,9 +365,9 @@ private module CryptoJS {
365365    override  CryptographicAlgorithm  getAlgorithm ( )  {  result .matchesName ( algorithm )  } 
366366
367367    override  int  getSize ( )  { 
368-       result  =  getOptionArgument ( optionArg ,  "keySize" ) .getIntValue ( )  *  32  // size is in words 
368+       result  =  this . getOptionArgument ( optionArg ,  "keySize" ) .getIntValue ( )  *  32  // size is in words 
369369      or 
370-       result  =  getArgument ( optionArg ) .getIntValue ( )  *  32  // size is in words 
370+       result  =  this . getArgument ( optionArg ) .getIntValue ( )  *  32  // size is in words 
371371    } 
372372
373373    override  predicate  isSymmetricKey ( )  {  any ( )  } 
@@ -496,19 +496,19 @@ private module Forge {
496496          // `require('forge').cipher.createCipher("3DES-CBC").update("secret", "key");` 
497497          ( createName  =  "createCipher"  or  createName  =  "createDecipher" )  and 
498498          this  =  mod .getAPropertyRead ( "cipher" ) .getAMemberCall ( createName )  and 
499-           getArgument ( 0 ) .asExpr ( ) .mayHaveStringValue ( cipherName )  and 
499+           this . getArgument ( 0 ) .asExpr ( ) .mayHaveStringValue ( cipherName )  and 
500500          cipherName  =  cipherPrefix  +  "-"  +  cipherSuffix  and 
501501          cipherSuffix  =  [ "CBC" ,  "CFB" ,  "CTR" ,  "ECB" ,  "GCM" ,  "OFB" ]  and 
502502          algorithmName  =  cipherPrefix  and 
503-           key  =  getArgument ( 1 ) 
503+           key  =  this . getArgument ( 1 ) 
504504        ) 
505505        or 
506506        // `require("forge").rc2.createEncryptionCipher("key").update("secret");` 
507507        exists ( string  createName  | 
508508          createName  =  "createEncryptionCipher"  or  createName  =  "createDecryptionCipher" 
509509        | 
510510          this  =  mod .getAPropertyRead ( algorithmName ) .getAMemberCall ( createName )  and 
511-           key  =  getArgument ( 0 ) 
511+           key  =  this . getArgument ( 0 ) 
512512        ) 
513513      ) 
514514    } 
@@ -583,7 +583,7 @@ private module Forge {
583583      result  =  this .getArgument ( 1 ) .getIntValue ( ) 
584584      or 
585585      exists ( DataFlow:: CallNode  call  |  call .getCalleeName ( )  =  [ "getBytes" ,  "getBytesSync" ]  | 
586-         getArgument ( 1 ) .getALocalSource ( )  =  call  and 
586+         this . getArgument ( 1 ) .getALocalSource ( )  =  call  and 
587587        result  =  call .getArgument ( 0 ) .getIntValue ( )  *  8  // bytes to bits 
588588      ) 
589589    } 
0 commit comments