[JIRA] (JENKINS-61275) Aqua Security Scanner Plugin NullPointerException if 'notCompliesCmd' not provided

2 views
Skip to first unread message

jenkins@lightning318.co.uk (JIRA)

unread,
Feb 28, 2020, 6:43:03 PM2/28/20
to jenkinsc...@googlegroups.com
Jonathan Bull created an issue
 
Jenkins / Bug JENKINS-61275
Aqua Security Scanner Plugin NullPointerException if 'notCompliesCmd' not provided
Issue Type: Bug Bug
Assignee: Moshe Cohen
Components: aqua-security-scanner-plugin
Created: 2020-02-28 23:42
Environment: Jenkins version: 2.190.2.2
Aqua security scanner version: 3.0.21
Priority: Minor Minor
Reporter: Jonathan Bull

When using the aqua security scanner in a pipeline script, if the 'notCompliesCmd' variable is not provided the plugin will throw a NullPointerException after running the scan. Adding the variable with an empty string value caused the Exception to go away.

The exception is thrown after the scan has completed and the report and css file added to the build result but before the exit code of the docker scanner is reported.

I was unable to get a stacktrace for the Exception.

 

Speculation:

Reading through the plugin code I have come up with the following speculation on the cause.

As notCompliesCmd is a string, if it is not provided then it will be null. It is not checked for null before it is used on this line in ScannerExecutor.java which would cause a NullPointerException to be thrown if it is null at this point.

At this point in the code, the report and css files have been transferred to the build.

This also explains why the exception goes away if the variable is provided with an empty value.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages