File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
ruby/ql/lib/codeql/ruby/security Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -528,22 +528,23 @@ private class CipherNode extends DataFlow::Node {
528528private class CipherOperation extends Cryptography:: CryptographicOperation:: Range ,
529529 DataFlow:: CallNode {
530530 private CipherNode cipherNode ;
531- private DataFlow:: Node input ;
532531
533532 CipherOperation ( ) {
534533 // cipher instantiation is counted as a cipher operation with no input
535534 cipherNode = this and cipherNode instanceof CipherInstantiation
536535 or
537536 this .getReceiver ( ) = cipherNode and
538- this .getMethodName ( ) = "update" and
539- input = this .getArgument ( 0 )
537+ this .getMethodName ( ) = "update"
540538 }
541539
542540 override Cryptography:: EncryptionAlgorithm getAlgorithm ( ) {
543541 result = cipherNode .getCipher ( ) .getAlgorithm ( )
544542 }
545543
546- override DataFlow:: Node getAnInput ( ) { result = input }
544+ override DataFlow:: Node getAnInput ( ) {
545+ this .getMethodName ( ) = "update" and
546+ result = this .getArgument ( 0 )
547+ }
547548
548549 override predicate isWeak ( ) {
549550 cipherNode .getCipher ( ) .isWeak ( ) or
You can’t perform that action at this time.
0 commit comments