@@ -39,36 +39,31 @@ module HardcodedSymmetricEncryptionKey {
39
39
StringLiteralSource ( ) { this .asExpr ( ) instanceof StringLiteral }
40
40
}
41
41
42
- private class SymmetricEncryptionKeyPropertySink extends Sink {
43
- SymmetricEncryptionKeyPropertySink ( ) {
44
- this .asExpr ( ) = any ( SymmetricAlgorithm sa ) .getKeyProperty ( ) .getAnAssignedValue ( )
45
- }
46
-
47
- override string getDescription ( ) { result = "'Key' property assignment" }
48
- }
49
-
50
- private class SymmetricAlgorithmCreateSinkCsv extends SinkModelCsv {
42
+ private class SymmetricAlgorithmSinkCsv extends SinkModelCsv {
51
43
override predicate row ( string row ) {
52
44
row =
53
45
[
54
46
"System.Security.Cryptography;SymmetricAlgorithm;true;CreateEncryptor;(System.Byte[],System.Byte[]);;Argument[0];encryption-encryptor" ,
55
47
"System.Security.Cryptography;SymmetricAlgorithm;true;CreateDecryptor;(System.Byte[],System.Byte[]);;Argument[0];encryption-decryptor" ,
48
+ "System.Security.Cryptography;SymmetricAlgorithm;true;set_Key;(System.Byte[]);;Argument[0];encryption-keyprop" ,
56
49
"Windows.Security.Cryptography.Core;SymmetricKeyAlgorithmProvider;false;CreateSymmetricKey;(Windows.Storage.Streams.IBuffer);;Argument[0];encryption-symmetrickey"
57
50
]
58
51
}
59
52
}
60
53
61
- private class SymmetricAlgorithmCreateEncryptorSink extends Sink {
54
+ private class SymmetricAlgorithmSink extends Sink {
62
55
private string kind ;
63
56
64
- SymmetricAlgorithmCreateEncryptorSink ( ) { sinkNode ( this , kind ) and kind .matches ( "encryption%" ) }
57
+ SymmetricAlgorithmSink ( ) { sinkNode ( this , kind ) and kind .matches ( "encryption%" ) }
65
58
66
59
override string getDescription ( ) {
67
60
kind = "encryption-encryptor" and result = "Encryptor(rgbKey, IV)"
68
61
or
69
62
kind = "encryption-decryptor" and result = "Decryptor(rgbKey, IV)"
70
63
or
71
64
kind = "encryption-symmetrickey" and result = "CreateSymmetricKey(IBuffer keyMaterial)"
65
+ or
66
+ kind = "encryption-keyprop" and result = "'Key' property assignment"
72
67
}
73
68
}
74
69
0 commit comments