Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on testNG : CVE-2022-4065 #652

Closed
MustanK57 opened this issue May 31, 2023 · 9 comments
Closed

Problem on testNG : CVE-2022-4065 #652

MustanK57 opened this issue May 31, 2023 · 9 comments
Assignees
Labels
Bug Something isn't working, needs an investigation and a fix confidential-client For issues related to confidential client apps P2 Normal priority items, should be done after P1 public-client For questions/issues related to public client apps

Comments

@MustanK57
Copy link

Hello,

Microsoft want the migration from ADAL to MSAL, but this migration is blocked by this vulnerability.
This vulnerability will be resolve soon (before the end of June ?).

Thank you

@bgavrilMS
Copy link
Member

@Avery-Dunn - I see MSAL Java using testng 7.1 - I assume bumping to testng 7.7 should not be a problem. I see that DependaBot proposed a fix #648 but the PR was closed without comments. Can you please add your reasoning for this?

@MustanK57 - thanks for pointing out, we'll look at this ASAP. Do you know what the attack vector is, since this is a test dependency only?

@bgavrilMS bgavrilMS added Bug Something isn't working, needs an investigation and a fix and removed Bug Something isn't working, needs an investigation and a fix labels May 31, 2023
@MustanK57
Copy link
Author

Vulnerability scan detect it on the download, and I need to be sure if it can cause a problem while I use this package.

@bgavrilMS bgavrilMS added Bug Something isn't working, needs an investigation and a fix P1 High priority items, should be done before any other work labels Jun 1, 2023
@bgavrilMS
Copy link
Member

bgavrilMS commented Jun 1, 2023

Ack, an attack vector in unlikely, but security tools prevent from using latest MSAL. We'll fix this with priority (definitely hopefully before end of June).

@bgavrilMS bgavrilMS added P2 Normal priority items, should be done after P1 and removed P1 High priority items, should be done before any other work labels Jun 1, 2023
@bgavrilMS
Copy link
Member

@siddhijain investigated this and can provide a few options. Seems like it's not an easy fix.

@bgavrilMS
Copy link
Member

@DidunAyodeji @localden - I believe this may be higher priority than brokers or Managed Identity, as folks will not pick up a package with a CVE label.

@siddhijain
Copy link
Contributor

It is not a simple fix to upgrade the version of this library as the latest secured version of test-ng is on Java 11 and msal java is built using Java 8.

We can transition from TestNG to a different framework, such as JUnit, which is widely recognized as one of the most popular testing frameworks in the Java world. However, it's important to note that the latest version of JUnit (JUnit 5) does not support the mocking framework currently used in MSAL Java (PowerMock). We have two potential approaches: either we can shift to an older version of JUnit (JUnit 4), or we can consider migrating the MSAL Java library to a mocking framework compatible with JUnit 5.

From my research, the rest of the migration from test-ng to JUnit should be simple.

@localden
Copy link

localden commented Jun 7, 2023

@siddhijain @bgavrilMS what is the support expectation around JUnit 4? Want to make sure that we're not taking a dependency on a library that will be deprecated. I see on GitHub that the latest release was in 2021.

I am leaning towards option (2) of upgrading both the testing and mock frameworks, but would also like to understand the cost and timeline implications here.

@bgavrilMS
Copy link
Member

bgavrilMS commented Jun 7, 2023

My 2c is to try to follow what Azure SDK do, which is to use JUnit 4 + Mokito

https://mvnrepository.com/artifact/com.azure/azure-identity/1.9.1

@Avery-Dunn
Copy link
Collaborator

As of #684 and the MSAL Java v1.13.9 release, the library uses JUnit5 and Mockito to resolve this CVE.

@bgavrilMS bgavrilMS added public-client For questions/issues related to public client apps confidential-client For issues related to confidential client apps labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working, needs an investigation and a fix confidential-client For issues related to confidential client apps P2 Normal priority items, should be done after P1 public-client For questions/issues related to public client apps
Projects
None yet
Development

No branches or pull requests

5 participants