[JIRA] (JENKINS-58387) Quality gates not working as expected

20 views
Skip to first unread message

james@howeswho.co.uk (JIRA)

unread,
Jul 8, 2019, 11:48:02 AM7/8/19
to jenkinsc...@googlegroups.com
James Howe created an issue
 
Jenkins / Bug JENKINS-58387
Quality gates not working as expected
Issue Type: Bug Bug
Assignee: Unassigned
Components: dependency-check-jenkins-plugin
Created: 2019-07-08 15:47
Environment: dependency-check 5.0
Priority: Major Major
Reporter: James Howe
dependencyCheckPublisher unstableTotalCritical: 1, unstableTotalHigh: 1,
                         unstableTotalMedium: 1, unstableTotalLow: 1

When there are no issues, the status is Success
When there is one medium issue, the status is Unstable
When there are two high and seven medium issues, the status is Success

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

james@howeswho.co.uk (JIRA)

unread,
Jul 8, 2019, 11:54:02 AM7/8/19
to jenkinsc...@googlegroups.com
James Howe updated an issue
Change By: James Howe
{code:groovy}
dependencyCheckPublisher unstableTotalCritical: 1,

unstableTotalHigh: 1,
                     unstableTotalMedium: 1,

unstableTotalLow: 1
{code}

When there are no issues, the status is Success (/)
When there is one medium issue, the status is Unstable (/)
When there are two high and seven medium issues, the status is Success (x)

steve.springett@owasp.org (JIRA)

unread,
Jul 10, 2019, 9:39:02 PM7/10/19
to jenkinsc...@googlegroups.com

"When there are two high and seven medium issues, the status is Success"

That's interesting and certainly a bug. Let me to and replicate

steve.springett@owasp.org (JIRA)

unread,
Jul 10, 2019, 9:39:02 PM7/10/19
to jenkinsc...@googlegroups.com
Steve Springett assigned an issue to Steve Springett
 
Change By: Steve Springett
Assignee: Steve Springett

james@howeswho.co.uk (JIRA)

unread,
Jul 11, 2019, 6:33:03 AM7/11/19
to jenkinsc...@googlegroups.com
James Howe updated an issue
Change By: James Howe
Attachment: resultaction.xml

james@howeswho.co.uk (JIRA)

unread,
Jul 11, 2019, 6:34:02 AM7/11/19
to jenkinsc...@googlegroups.com
James Howe commented on Bug JENKINS-58387
 
Re: Quality gates not working as expected

It doesn't appear to have saved the source xml under the job result, but attached is the ResultAction.

I'll sort out rebuilding that commit and dig it out.

james@howeswho.co.uk (JIRA)

unread,
Jul 11, 2019, 6:51:03 AM7/11/19
to jenkinsc...@googlegroups.com

I cannot trivially reproduce it either using the same commit as before (config is also the same, being via Jenkinsfile).
I have since upgraded to 5.0.1.

The build that didn't become unstable simply logged

[DependencyCheck] Collecting Dependency-Check artifact

james@howeswho.co.uk (JIRA)

unread,
Jul 11, 2019, 6:53:02 AM7/11/19
to jenkinsc...@googlegroups.com

Had a look at the code and realised the problem.

It only evaluates the gates if the previous build exists, and had compatible dependency-check results.
Instead it should always evaluate. If there are no results for the previous build it should count that as zero issues.

james@howeswho.co.uk (JIRA)

unread,
Jul 11, 2019, 6:54:01 AM7/11/19
to jenkinsc...@googlegroups.com
James Howe edited a comment on Bug JENKINS-58387
Had a look at the code and realised the problem.

It only evaluates the gates if the previous build exists, and had compatible dependency-check results.
Instead it should always evaluate. If there are no results for the previous build results it should count that as zero issues.

steve.springett@owasp.org (JIRA)

unread,
Jul 12, 2019, 12:32:03 AM7/12/19
to jenkinsc...@googlegroups.com

steve.springett@owasp.org (JIRA)

unread,
Jul 12, 2019, 12:32:03 AM7/12/19
to jenkinsc...@googlegroups.com
Steve Springett resolved as Fixed
 
Change By: Steve Springett
Status: In Progress Resolved
Resolution: Fixed

steve.springett@owasp.org (JIRA)

unread,
Jul 12, 2019, 12:32:03 AM7/12/19
to jenkinsc...@googlegroups.com
Steve Springett started work on Bug JENKINS-58387
 
Change By: Steve Springett
Status: Open In Progress

steve.springett@owasp.org (JIRA)

unread,
Jul 12, 2019, 12:51:02 AM7/12/19
to jenkinsc...@googlegroups.com
Steve Springett closed an issue as Fixed
 

Fixed in 5.0.2

Change By: Steve Springett
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages