dependency-check / dependency-check-sonar-plugin

Integrates Dependency-Check reports into SonarQube
585 stars 133 forks source link

Integrate OWASP plugin with SonarQube from Azure Pipeline #879

Closed hyousif-pkglobal closed 9 months ago

hyousif-pkglobal commented 9 months ago

Describe the bug I added the following configuration in Azure Pipeline in order to get OWASP report published in SonarQube dashboard, however, I didn't get the expected results.

          - task: SonarQubePrepare@5
            displayName: 'Prepare analysis on SonarQube'
            inputs:
              SonarQube: 'MyConnection'
              scannerMode: 'CLI'
              configMode: 'manual'
              cliProjectKey: '*****************'
              cliProjectName: 'MyProject'
              cliSources: $(Build.SourcesDirectory)
              extraProperties: |
                sonar.python.coverage.reportPaths=$(Build.SourcesDirectory)/coverage.xml
                sonar.dependencyCheck.jsonReportPath=$(Build.ArtifactStagingDirectory)/dependency-check-report.json
                sonar.dependencyCheck.htmlReportPath=$(Build.ArtifactStagingDirectory)/dependency-check-report.html
                sonar.dependencyCheck.reportPath=$(Build.ArtifactStagingDirectory)/dependency-check-report.xml

To Reproduce It would be helpful when you support us with example projects. Steps to reproduce the behavior:

  1. Create Azure DevOps project with Azure Pipleine.
  2. Create a connection in Azure DevOps project to SonarQube.
  3. Add SonarQube blocks to Azure Pipeline.
  4. Install OWASP plugin in SonarQube dashboard.
  5. Add OWASP depedency check installation steps to Azure pipeline as well as the steps to generate OWASP report.
  6. Update SonarQube configuration in Azure Pipeline to include the location of OWAP report.
  7. Run the pipeline

Current behavior The same results are received with or without OWASP plugin is installed and configured.

Expected behavior OWASP report is expected to be published in SonarQube dashboard

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

Additional context Help would be appreciated.