Skip to content

Instantly share code, notes, and snippets.

@cmcdevitt
Created October 31, 2018 17:10
Show Gist options
  • Select an option

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

Select an option

Save cmcdevitt/5e23d38f24aa1f221bac3384a040cd3f to your computer and use it in GitHub Desktop.
Resolved Vulnerabilities Count on a Vulnerability Groups
//Resolved, Defered, Closed
var count = new GlideAggregate('sn_vul_m2m_vul_group_item');
count.addAggregate('COUNT');
count.addEncodedQuery('sn_vul_vulnerable_item.stateIN101,12,3^sn_vul_vulnerability=f52bc720df11120068c32df36bf26384');
count.query();
var vits = 0;
if (count.next()) {
vits = count.getAggregate('COUNT');
}
gs.info('Number of vits: ' + vits);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment