File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
test/query-tests/Security/CWE/CWE-327 Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,10 @@ class InsecureFunctionCall extends FunctionCall {
7979 explain = "function call"
8080 or
8181 exists ( MacroInvocation mi |
82- mi .getAnExpandedElement ( ) = this .getAnArgument ( ) and
82+ (
83+ mi .getAnExpandedElement ( ) = this or
84+ mi .getAnExpandedElement ( ) = this .getAnArgument ( )
85+ ) and
8386 mi .getMacro ( ) = getAnInsecureEncryptionMacro ( ) and
8487 blame = mi and
8588 explain = "macro invocation"
@@ -97,7 +100,10 @@ class InsecureFunctionCall extends FunctionCall {
97100 getTarget ( ) = getAdditionalEvidenceFunction ( )
98101 or
99102 exists ( MacroInvocation mi |
100- mi .getAnExpandedElement ( ) = this .getAnArgument ( ) and
103+ (
104+ mi .getAnExpandedElement ( ) = this or
105+ mi .getAnExpandedElement ( ) = this .getAnArgument ( )
106+ ) and
101107 mi .getMacro ( ) = getAdditionalEvidenceMacro ( )
102108 )
103109 or
Original file line number Diff line number Diff line change 2424| test.cpp:92:2:92:17 | call to encryptTripleDES | This function call specifies a broken or weak cryptographic algorithm. |
2525| test.cpp:101:2:101:15 | call to do_des_encrypt | This function call specifies a broken or weak cryptographic algorithm. |
2626| test.cpp:102:2:102:12 | call to DES_Set_Key | This function call specifies a broken or weak cryptographic algorithm. |
27+ | test.cpp:121:2:121:24 | INIT_ENCRYPT_WITH_DES() | This macro invocation specifies a broken or weak cryptographic algorithm. |
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ void my_implementation8();
118118
119119void test_macros2 ()
120120{
121- INIT_ENCRYPT_WITH_DES (); // BAD [NOT DETECTED]
121+ INIT_ENCRYPT_WITH_DES (); // BAD
122122 INIT_ENCRYPT_WITH_AES (); // GOOD (good algorithm)
123123
124124 // ...
You can’t perform that action at this time.
0 commit comments