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 {
528
528
private class CipherOperation extends Cryptography:: CryptographicOperation:: Range ,
529
529
DataFlow:: CallNode {
530
530
private CipherNode cipherNode ;
531
- private DataFlow:: Node input ;
532
531
533
532
CipherOperation ( ) {
534
533
// cipher instantiation is counted as a cipher operation with no input
535
534
cipherNode = this and cipherNode instanceof CipherInstantiation
536
535
or
537
536
this .getReceiver ( ) = cipherNode and
538
- this .getMethodName ( ) = "update" and
539
- input = this .getArgument ( 0 )
537
+ this .getMethodName ( ) = "update"
540
538
}
541
539
542
540
override Cryptography:: EncryptionAlgorithm getAlgorithm ( ) {
543
541
result = cipherNode .getCipher ( ) .getAlgorithm ( )
544
542
}
545
543
546
- override DataFlow:: Node getAnInput ( ) { result = input }
544
+ override DataFlow:: Node getAnInput ( ) {
545
+ this .getMethodName ( ) = "update" and
546
+ result = this .getArgument ( 0 )
547
+ }
547
548
548
549
override predicate isWeak ( ) {
549
550
cipherNode .getCipher ( ) .isWeak ( ) or
You can’t perform that action at this time.
0 commit comments