Use the WebHook

You can forward Jenkins job results to a WebHook URL.

  1. Select 'getImageVulnsFromQualys - Scan container images with Qualys CS'.
  2. Set a global WebHook URL under Manage Jenkins > Configure System > Qualys Container Security, or a Job Specific WebHook URL under Snippet Generator
  3. Click Advanced.

 The webHook URL specified under Snippet Generator for a particular project always precedes the global WebHook URL specified under Manage Jenkins > Configure System > Qualys Container Security.

WebHook data sample

{
   "buildNumber":"12",
   "jobName":"1600Freestyle",
   "jobUrl":"http://localhost:8080/job/1600Freestyle/",
   "buildStatus":"Failed",
   "failReason":[
      {
         "imageId":"1708c4cb79fd",
         "severity":{
            "2":{
               "configured":0,
               "found":2
            },
            "3":{
               "configured":0,
               "found":20
            },
            "4":{
               "configured":0,
               "found":4
            },
            "5":{
               "configured":0,
               "found":3
            }
         },
         "qid":{
            "configured":"256510-256570,176983",
            "found":"176983"
         },
         "cve":{
            "configured":"CVE-2019-3846,CVE-2019-5489,CVE-2019-9500,CVE-2019-9503,CVE-2019-10126,CVE-2019-11477,CVE-2019-11478,CVE-2019-11479,CVE-2019-11486,CVE-2019-11599,CVE-2019-11815,CVE-2019-11833,CVE-2019-11884",
            "found":"CVE-2019-3846,CVE-2019-5489,CVE-2019-9500,CVE-2019-9503,CVE-2019-10126,CVE-2019-11477,CVE-2019-11478,CVE-2019-11479,CVE-2019-11486,CVE-2019-11599,CVE-2019-11815,CVE-2019-11833,CVE-2019-11884"
         },
         "cvss":{
            "configured":0,
            "found":29,
            "version":2
         },
         "software":{
            "configured":"python-urlgrabber, python3",
            "found":"python3=3.5.3-1"
         }
      }
   ],
   "images":[
      {
         "imageId":"1708c4cb79fd",
         "uuid":"28bbxxxx-xxxx-xxxx-xxxx-xxxfd626af7a",
         "sha":"1708xxxxxxxd6cb318xxxxxx23a36axxxxxcaxxxxxddcda8c9ac15c48e9de7b5",
         "size":1242755393,
         "repo":[
            {
               "registry":"docker.io",
               "tag":"latest",
               "repository":"dock_jenkins_3"
            }
         ],
         "operatingSystem":"Debian Linux 9.5",
         "layersCount":62,
         "dockerVersion":"1.13.1",
         "architecture":"amd64",
         "vulnerabilities":{
            "totalVulnerabilities":29,
            "typeDetected":{
               "Confirmed":24,
               "Potential":5
            },
            "severity":{
               "Potential":{
                  "1":0,
                  "2":1,
                  "3":2,
                  "4":1,
                  "5":1
               },
               "Confirmed":{
                  "1":0,
                  "2":1,
                  "3":18,
                  "4":3,
                  "5":2
               }
            },
            "patchable":{
               "yes":26,
               "no":3
            }
         }
      }
   ]
}	  
	  

 

Next Step

Provide Configuration Details