Skip to content

Instantly share code, notes, and snippets.

@cmcdevitt
Created October 31, 2018 16:46
Show Gist options
  • Select an option

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

Select an option

Save cmcdevitt/7f8f764e1fc7953d71f23a514b6edf63 to your computer and use it in GitHub Desktop.
VIT Count on Vulnerability Group
var count = new GlideAggregate('sn_vul_m2m_vul_group_item');
count.addAggregate('COUNT');
count.addEncodedQuery('sn_vul_vulnerability=003bc720df11120068c32df36bf263a2');
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