My team is conducting academic research on Java Cryptography API based misuse using your tool. We found that we could not detect some potential cryptographic misuses.
We believe this may be due to underlying implementation or design gaps. Each cryptographic vulnerability was generated as a barebone Java project that only contained a single vulnerability in the main function and used up to two java source files. A jar was made which was then scanned using CryptoGuard.
Additionally, all cryptographic API calls were from Java Cryptographic Architecture (JCA).
Environment
Component
Version
Java Runtime
OpenJDK version 1.8.0_232 64 bit
CG Commit Used
42197b03f65d9b58abc1c9f49eb427f140393ede
Even though the commit is different from the current version, I don't think much has changed in between these commits.
Problem
Weak algorithm names are not detected when they go through various types of transformations. We noticed this for both MessageDigest and Cipher.
Code
Replacing a Secure Parameter with an Insecure Parameter:
Hi,
My team is conducting academic research on Java Cryptography API based misuse using your tool. We found that we could not detect some potential cryptographic misuses. We believe this may be due to underlying implementation or design gaps. Each cryptographic vulnerability was generated as a barebone Java project that only contained a single vulnerability in the main function and used up to two java source files. A jar was made which was then scanned using CryptoGuard. Additionally, all cryptographic API calls were from Java Cryptographic Architecture (JCA).
Environment
Even though the commit is different from the current version, I don't think much has changed in between these commits.
Problem
Weak algorithm names are not detected when they go through various types of transformations. We noticed this for both MessageDigest and Cipher.
Code
Replacing a Secure Parameter with an Insecure Parameter:
Replacing an Insecure Parameter with an Insecure Parameter:
where "AES" by itself is insecure as it defaults to using ECB.
Transforming string case, e.g., from lower to upper case:
Replacing a noisy version of insecure parameters:
Inserting an Insecure Parameter via method chaining calls:
Please let me know if you need any additional information (e.g., logs from our side) in fixing these issues.
Thanks! :)