File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
test/query-tests/Security/CWE/CWE-327 Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ Function getAnInsecureEncryptionFunction() {
3131Function getAdditionalEvidenceFunction ( ) {
3232 (
3333 isEncryptionAdditionalEvidence ( result .getName ( ) ) or
34- isEncryptionAdditionalEvidence ( result .getAParameter ( ) .getName ( ) ) or
35- isEncryptionAdditionalEvidence ( result .getDeclaringType ( ) .getName ( ) )
34+ isEncryptionAdditionalEvidence ( result .getAParameter ( ) .getName ( ) )
3635 ) and
3736 exists ( result .getACallToThisFunction ( ) )
3837}
Original file line number Diff line number Diff line change 77| test2.cpp:182:38:182:45 | ALGO_DES | This macro invocation specifies a broken or weak cryptographic algorithm. |
88| test2.cpp:185:38:185:44 | USE_DES | This enum constant access specifies a broken or weak cryptographic algorithm. |
99| test2.cpp:238:2:238:20 | call to encrypt | This function call specifies a broken or weak cryptographic algorithm. |
10- | test2.cpp:240:2:240:28 | call to doSomethingElse | This function call specifies a broken or weak cryptographic algorithm. |
1110| test2.cpp:245:5:245:11 | call to encrypt | This function call specifies a broken or weak cryptographic algorithm. |
12- | test2.cpp:247:5:247:19 | call to doSomethingElse | This function call specifies a broken or weak cryptographic algorithm. |
1311| test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This macro invocation specifies a broken or weak cryptographic algorithm. |
1412| test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | This macro invocation specifies a broken or weak cryptographic algorithm. |
1513| test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | This macro invocation specifies a broken or weak cryptographic algorithm. |
Original file line number Diff line number Diff line change @@ -237,14 +237,14 @@ void do_classes(const char *data)
237237{
238238 desEncrypt::encrypt (data); // BAD
239239 aes256Encrypt::encrypt (data); // GOOD
240- desEncrypt::doSomethingElse (); // GOOD [FALSE POSITIVE]
240+ desEncrypt::doSomethingElse (); // GOOD
241241 aes256Encrypt::doSomethingElse (); // GOOD
242242
243243 desCipher dc;
244244 aesCipher ac;
245245 dc.encrypt (data); // BAD
246246 ac.encrypt (data); // GOOD
247- dc.doSomethingElse (); // GOOD [FALSE POSITIVE]
247+ dc.doSomethingElse (); // GOOD
248248 ac.doSomethingElse (); // GOOD
249249}
250250
You can’t perform that action at this time.
0 commit comments