dependency-check / azuredevops

Dependency Check Azure DevOps Extension
Apache License 2.0
44 stars 26 forks source link

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

Open VladimirLevchuk opened 8 months ago

VladimirLevchuk commented 8 months ago

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:

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