Skip to content

Commit 04130d4

Browse files
authored
Merge pull request #966 from AzureAD/avdunn/codeql-suppressions
Suppress CodeQL issues
2 parents ae56785 + 0b4f4a6 commit 04130d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/ClientCertificate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static ClientCertificate create(final PrivateKey key, final X509Certificate publ
110110
}
111111

112112
private static byte[] getHashSha1(final byte[] inputBytes) throws NoSuchAlgorithmException {
113-
final MessageDigest md = MessageDigest.getInstance("SHA-1");
113+
final MessageDigest md = MessageDigest.getInstance("SHA-1"); // CodeQL [SM05136] ADFS scenarios require SHA-1 hashing, and we cannot remove our use until ADFS does.
114114
md.update(inputBytes);
115115
return md.digest();
116116
}

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/DefaultHttpClientManagedIdentity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static void addTrustedCertificateThumbprint(HttpsURLConnection httpsUrlCo
8787

8888
// CodeQL [SM03767] False positive: the TrustManager created later on will only trust a certificate with a specific thumbprint.
8989
if (httpsUrlConnection.getHostnameVerifier() != ALL_HOSTS_ACCEPT_HOSTNAME_VERIFIER) {
90-
httpsUrlConnection.setHostnameVerifier(ALL_HOSTS_ACCEPT_HOSTNAME_VERIFIER);
90+
httpsUrlConnection.setHostnameVerifier(ALL_HOSTS_ACCEPT_HOSTNAME_VERIFIER); // CodeQL [SM03767] We expect the connection to work against a specific server side certificate only, so it's safe to disable the host name verification.
9191
}
9292

9393
// Create a Trust manager that trusts only certificate with specified thumbprint.

0 commit comments

Comments
 (0)