Skip to content

Instantly share code, notes, and snippets.

@cmcdevitt
Last active October 31, 2018 16:32
Show Gist options
  • Select an option

  • Save cmcdevitt/cca9cb1933054fd65ea52d197ed8db97 to your computer and use it in GitHub Desktop.

Select an option

Save cmcdevitt/cca9cb1933054fd65ea52d197ed8db97 to your computer and use it in GitHub Desktop.
How many Vulnerability Groups
var count = new GlideAggregate('sn_vul_vulnerability');
count.addAggregate('COUNT');
//count.addEncodedQuery('state=2'); //State = Under Investigation
count.query();
var vul_grp = 0;
if (count.next()) {
vul_grp = count.getAggregate('COUNT');
}
gs.info('Number of VulGrps: ' + vul_grp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment