SonarQube Analyse Task Failure!

While scanning the Ansible code using the Azure DevOps pipeline. The SonarQubeAnalyze task fails with following error message :-

##[warning]Error while executing SonarQube:Analyze task: EPERM: operation not permitted, chmod ‘/__w/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.1/sonar-scanner/bin/sonar-scanner’
##[error]EPERM: operation not permitted, chmod ‘/__w/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/6.3.1/sonar-scanner/bin/sonar-scanner’

Hey there.

Can you share your full Azure DevOps Pipeline YML, as well as your build logs?

1 Like

Hi Colin,
Thank you for taking your time out and looking into it. Please find the requested information.
Attached requested information.

Regards
Antariksh Mistry

Thanks! It looks like we made a change recently ([SONARAZDO-389] - Jira) around what permissions get applied to the scanner. It seems like yours is a case we should investigate why it stopped working.

I’ve flagged it for the relevant team. In the meantime, you can try using the @5 versions of the tasks.

1 Like

Thanks, I gave a quick try using the version 5 and I encountered the same issue. Wondering if i have missed something.
Attached Log information.
LOG.txt (1.6 KB)

Hm, I didn’t expect that!

I suppose it goes without saying that you’re facing this issue on a self-hosted build agent?

1 Like

Hi Colin, We manage to fix it & it also now works with version 6.

We did the following changes :-

  1. Changed Default agent pool for YAML (YES, using a self-hosted one)
  2. At SonarQubePrepare@6, add a variable :- NODE_EXTRA_CA_CERTS
  3. Installed Java on the self hosted Build Agent

Appreciate your efforts to help us with the issue !