-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.361.4 (LTS)
OWASP Dependency-Check Plugin Version 5.2.0
Job DSL Version 1.81
When I define a publisher for dependencyCheck in my JobDSL, as described in the
documentation,
publishers { dependencyCheck('target/dependency-check-report.xml') { healthLimits(3, 20) thresholdLimit('high') defaultEncoding('UTF-8') canRunOnFailed(true) useStableBuildAsReference(true) useDeltaValues(true) computeNew(true) shouldDetectModules(true) thresholds( unstableTotal: [high: 1, normal: 1], failedTotal: [high: 2] ) } }
I get following in the config.xml which does not reflect correctly when I open the job in the Jenkins UI:
<publishers> <org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher> <healthy>3</healthy> <unHealthy>20</unHealthy> <thresholdLimit>high</thresholdLimit> <defaultEncoding>UTF-8</defaultEncoding> <canRunOnFailed>true</canRunOnFailed> <useStableBuildAsReference>true</useStableBuildAsReference> <useDeltaValues>true</useDeltaValues> <thresholds> <unstableTotalHigh>1</unstableTotalHigh> <unstableTotalNormal>1</unstableTotalNormal> <failedTotalHigh>2</failedTotalHigh> </thresholds> <shouldDetectModules>true</shouldDetectModules> <dontComputeNew>true</dontComputeNew> <doNotResolveRelativePaths>true</doNotResolveRelativePaths> <pattern>target/dependency-check-report.xml</pattern> </org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher> </publishers>
If I use the UI to change the configuration, it gives me the following config.xml:
<publishers> <org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher plugin="dependency-check-jenkins-plugin@5.2.0"> <unstableTotalHigh>1</unstableTotalHigh> <failedTotalCritical>1</failedTotalCritical> <totalThresholdAnalysisExploitable>false</totalThresholdAnalysisExploitable> <newThresholdAnalysisExploitable>false</newThresholdAnalysisExploitable> <pattern>target/dependency-check-report.xml</pattern> <stopBuild>true</stopBuild> </org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher> </publishers>