dependency-check/azuredevops

dependency-check-build-task@6 format ALL ignored when excludePath present (and only html report published)

Opened this issue · 0 comments

Hi,

I'm trying to exclude _legacy folder from the dependency check, my yaml is:

trigger:
  branches:
    include:
      - main
      - feature/*
      - hotfix/*
      - release/*

pool:
  vmImage: 'windows-latest'

steps:
- task: dependency-check-build-task@6
  inputs:
    projectName: myProject
    scanPath: '**/*.csproj'
    format: ALL
    reportsDirectory: dependency-check
    suppressionPath: 'build/dependency-check.known.xml'               
    excludePath: '_legacy/'    
- task: PublishTestResults@2
  inputs:
    testResultsFormat: JUnit
    testResultsFiles: dependency-check/*junit.xml
    testRunTitle: 'Dependency check'
    failTaskOnFailedTests: true

and ot outputs only 1 report: D:\\a\\1\\s\\dependency-check\\dependency-check-report.html
I also tried to set format to JUnit - result is the same.
The previous version without exclude path worked fine:

pool:
  vmImage: 'windows-latest'

steps:
- task: dependency-check-build-task@6
  inputs:
    projectName: myProject
    scanPath: '**/*.csproj'
    format: ALL
    reportsDirectory: dependency-check
    suppressionPath: 'build/dependency-check.known.xml'               
- task: PublishTestResults@2
  inputs:
    testResultsFormat: ALL
    testResultsFiles: dependency-check/*junit.xml
    testRunTitle: 'Dependency check'
    failTaskOnFailedTests: true

my folders structure:

  • (root)
    • _legacy
    • build
      • dependency-check.yml
      • dependency-check.known.xml
    • SubProject-1
    • SubProject-2
    • root-solution.sln

updated: fixed format in the second (working) yaml sample