thread.interrupt vulnerability in cloud manager | Community
Skip to main content
March 3, 2022

thread.interrupt vulnerability in cloud manager

  • March 3, 2022
  • 2 replies
  • 1833 views

Hi Team,

 

We are using custom workflow for some data processing and have used Thread.sleep(10000) in some method waiting. We are Catching the InterruptedException and along with logging it we are calling 

Thread.currentThread().interrupt();

 

As per cloud manager code scan, it comes up as vulnerabilities. Is there any possible way to handle this.

 

Thanks,

Volga

@shardendu_jha 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Anmol_Bhardwaj
Community Advisor
Community Advisor
March 3, 2022

Hi @volga_dharam_rakshika ,

 

Is there any reason you are trying to stop/pause the thread?
Can you please explain the use case little bit. 

March 3, 2022

The main thread is waiting for some background process to complete while the main thread is sleeping.

The workflow reads a file and stores the processed data internally. We have called Thread.sleep in workflow process so that internally AEM can complete its processing 

March 10, 2022

I'm not sure if interrupting the thread would be the best approach.

Instead, what I can suggest is, instead of this approach, what you can do is create a workflow launcher which can auto-trigger based on node changes in the particular path/paths.

 

HelpDoc: https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/workflows-starting.html?lang=en#workflows-launchers


The issue we are trying to resolve is not around workflows. It is around the compliant core for such scenarios to prevent SONAR issues.

kautuk_sahni
Community Manager
Community Manager
May 30, 2022

@volga_dharam_rakshika 

[Webinar | AEM GEMs] Looking under the hood - Cloud Manager 2022 | Register: https://adobe.ly/3t4jfgp  & Ask Questions related to this Webinar: https://adobe.ly/3O0rdzd 

Date &Time: Wednesday, June 15, 2022 - 8 am PDT OR 5 pm CET OR 8.30 pm IST
Speakers: Remus Stratulat & Shankari Panchapakesan

Share this within your Organisation and with your AEM peers!!

Kautuk Sahni