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() {
31
31
Function getAdditionalEvidenceFunction ( ) {
32
32
(
33
33
isEncryptionAdditionalEvidence ( result .getName ( ) ) or
34
- isEncryptionAdditionalEvidence ( result .getAParameter ( ) .getName ( ) ) or
35
- isEncryptionAdditionalEvidence ( result .getDeclaringType ( ) .getName ( ) )
34
+ isEncryptionAdditionalEvidence ( result .getAParameter ( ) .getName ( ) )
36
35
) and
37
36
exists ( result .getACallToThisFunction ( ) )
38
37
}
Original file line number Diff line number Diff line change 7
7
| test2.cpp:182:38:182:45 | ALGO_DES | This macro invocation specifies a broken or weak cryptographic algorithm. |
8
8
| test2.cpp:185:38:185:44 | USE_DES | This enum constant access specifies a broken or weak cryptographic algorithm. |
9
9
| 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. |
11
10
| 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. |
13
11
| test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This macro invocation specifies a broken or weak cryptographic algorithm. |
14
12
| test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | This macro invocation specifies a broken or weak cryptographic algorithm. |
15
13
| 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)
237
237
{
238
238
desEncrypt::encrypt (data); // BAD
239
239
aes256Encrypt::encrypt (data); // GOOD
240
- desEncrypt::doSomethingElse (); // GOOD [FALSE POSITIVE]
240
+ desEncrypt::doSomethingElse (); // GOOD
241
241
aes256Encrypt::doSomethingElse (); // GOOD
242
242
243
243
desCipher dc;
244
244
aesCipher ac;
245
245
dc.encrypt (data); // BAD
246
246
ac.encrypt (data); // GOOD
247
- dc.doSomethingElse (); // GOOD [FALSE POSITIVE]
247
+ dc.doSomethingElse (); // GOOD
248
248
ac.doSomethingElse (); // GOOD
249
249
}
250
250
You can’t perform that action at this time.
0 commit comments