Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

machine_filter on Vulnerability response Microsoft TVM

obos-andreas
Giga Contributor

Im trying to apply a machine_filter for importing machines from Microsoft TVM in VR. The filters the machines being imported as CIs, but doesn not filter the vulnerabilities on machines, so we end up with a lot of vulnerabilities that we do not want in VR.

Does anyone know how to actually write a machine filter for VR import based on rbac-groups in Microsoft TVM that makaes us able to exclude machines we dont want?

 

USecase now is to exclude all clients as they will be managed by another system.

1 ACCEPTED SOLUTION

obos-andreas
Giga Contributor

Figured this out by myself.

Used this kb and adjusted the filter: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1573367

 

filter used:

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

ignore = true;

//sn_vul_msft_tvm.processor.processRecord(source);

if (source.u_rbacgroupname == "$rbacgroup1" || source.u_rbacgroupname == "$rbacgroup2")

 sn_vul_msft_tvm.processor.processRecord(source);

})(source, map, log, target);

 

View solution in original post

1 REPLY 1

obos-andreas
Giga Contributor

Figured this out by myself.

Used this kb and adjusted the filter: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1573367

 

filter used:

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

ignore = true;

//sn_vul_msft_tvm.processor.processRecord(source);

if (source.u_rbacgroupname == "$rbacgroup1" || source.u_rbacgroupname == "$rbacgroup2")

 sn_vul_msft_tvm.processor.processRecord(source);

})(source, map, log, target);