Set it and Forget it Qualys Reporting Shell Script

File uploaded by Brandon Reeves on Mar 3, 2011Last modified by Brandon Reeves on Mar 7, 2011
Version 4Show Document
  • View in full screen mode

Set it and forget it script to run multiple scan reports using similar names asset / distribution groups.

 

Here is how we use this script.

 

When an asset group is setup, a distro group is setup with the same name. A scan runs each night on all assets.

A file (sn.txt) is updated with that name, we call it the short name (sn).

 

The short name drives everything.

 

So we have a short name that is an asset group, distro group, and is also in this text file. This script is setup to run automatically (cron) to pull from the text file each line and run a report based on the name in each line. At that time, the script runs a scan report, emails the report to the distro list with the same name, and downloads the report to our web portal as a PDF since most users dont have accounts in qualys.

 

The real unique factor in all this is that is was done completely in shell script. No perl etc etc. so you can put it on any *nix machine and it should run. The file is attached and well commented. Hope this helps someone out.

Attachments

Outcomes