AnsweredAssumed Answered

Groovy Syntax for 2 QIDs ?

Question asked by Damian OHara on Apr 11, 2019
Latest reply on Apr 16, 2019 by Damian OHara

I need to create a tag that matches when one QID is present on a host AND the second QID is not.

To do it for 2 matching QIDs I know it's:

 

if(asset.getAssetType()!=Asset.AssetType.HOST) return false;
return asset.hasAnyVuln([22000,45239])

 

But I've tried the following and it matches none:

 

if(asset.getAssetType()!=Asset.AssetType.HOST) return false;
return asset.hasVuln([22000]) && !asset.hasVuln([45239])

 

Any thoughts please ?

Outcomes