dependency-check / dependency-check/azuredevops

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

Open
#133 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
53
Forks
35
PR merge metrics
No merged PRs in 30d

Description

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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.