@@ -18,7 +18,7 @@ import csharp
18
18
*/
19
19
predicate isCreatingAzureClientSideEncryptionObject ( ObjectCreation oc , Class c , Expr e ) {
20
20
exists ( Parameter p | p .hasName ( "version" ) |
21
- c .getQualifiedName ( ) in [ "Azure.Storage.ClientSideEncryptionOptions" ] and
21
+ c .hasQualifiedName ( "Azure.Storage.ClientSideEncryptionOptions" ) and
22
22
oc .getTarget ( ) = c .getAConstructor ( ) and
23
23
e = oc .getArgumentForParameter ( p )
24
24
)
@@ -28,7 +28,7 @@ predicate isCreatingAzureClientSideEncryptionObject(ObjectCreation oc, Class c,
28
28
* Holds if `oc` is an object creation of the outdated type `c` = `Microsoft.Azure.Storage.Blob.BlobEncryptionPolicy`
29
29
*/
30
30
predicate isCreatingOutdatedAzureClientSideEncryptionObject ( ObjectCreation oc , Class c ) {
31
- c .getQualifiedName ( ) in [ "Microsoft.Azure.Storage.Blob.BlobEncryptionPolicy" ] and
31
+ c .hasQualifiedName ( "Microsoft.Azure.Storage.Blob.BlobEncryptionPolicy" ) and
32
32
oc .getTarget ( ) = c .getAConstructor ( )
33
33
}
34
34
@@ -37,7 +37,7 @@ predicate isCreatingOutdatedAzureClientSideEncryptionObject(ObjectCreation oc, C
37
37
* version 2+ for client-side encryption and if the argument for the constructor `version`
38
38
* is set to a secure value.
39
39
*/
40
- predicate isObjectCreationSafe ( Class c , Expr versionExpr , Assembly asm ) {
40
+ predicate isObjectCreationSafe ( Expr versionExpr , Assembly asm ) {
41
41
// Check if the Azure.Storage assembly version has the fix
42
42
exists ( int versionCompare |
43
43
versionCompare = asm .getVersion ( ) .compareTo ( "12.12.0.0" ) and
66
66
(
67
67
exists ( Expr e2 |
68
68
isCreatingAzureClientSideEncryptionObject ( e , c , e2 ) and
69
- not isObjectCreationSafe ( c , e2 , asm )
69
+ not isObjectCreationSafe ( e2 , asm )
70
70
)
71
71
or
72
72
isCreatingOutdatedAzureClientSideEncryptionObject ( e , c )
0 commit comments