
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
07-05-2021 07:49 AM - edited 08-05-2024 11:15 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
When adding loads of Scan Checks with ServiceNow best practices, JavaScript best practices, company standards, etcetera, and performing scans you're likely confronted with Scan Findings on thousands of objects. Scan Findings if you look closer, from already years and years ago. Especially when these are of priority 3 or priority 4, Scan Findings which you probably won't look into.
You could embed in your way of working, that you mute legacy Scan Findings once, then having a clean starting point for future scans. You can mute those Scan Findings one by one or through the list with up to 100 records at a time (depending on your list setting)… though isn't there an easier way?!
Mute Scan Finding (out-of-the-box)
Out-of-the-box there is a UI Action on the Scan Finding table which is presented on lists as List Choice and on forms as Form button. The UI Action opens a modal where you can provide the reason for muting and then mutes the Scan Finding. Muting actually means creating a "Mute Rule" record [scan_mute_rule], and updating the Scan Finding with a reference to the created Mute Rule record, and setting the "Muted" field on the Scan Finding to true.
Mute hundreds or thousands legacy Scan Findings
If you have thousands of Scan Findings - which isn't uncommon while performing your first scans - a way of working could be to mute all legacy Scan Findings. Muting because you're likely not going to look at all at older priority 3 or priority 4 Scan Findings. It's too much to look into and fix, no priority, Scan Findings from colleges or consultants that have left the organization, etcetera. Also muting, so you have a clean starting point for future scans.
One note though: out-of-the-box, once an object is muted, it stays muted even if you update that object! Consider creating a Business Rule, for example to unmute updated muted objects, so they will be scanned again.
Custom UI Action "Mute Lagacy Scan Findings"
What I came up with, wanting to be able to mute Scan Findings before a certain date, a date manually entered, and Scan Findings of priority 3 and priority 4 only. So legacy Scan Findings of priority 1 or priority 2 will remain.
On the Scan Result form layout I added a form link UI Action:
The modal simply lets you select a date/time. All priority 3 and 4 Scan Findings (on the current Scan Result) last updated before the date/time selected, will be muted.
The artifacts behind this:
- UI Action
- UI Action Role (for scan_user)
- UI Page
I won't go into detail about the scripting behind the UI Action and UI Page. If interested in the code, just have a look after downloading it from Share!
Share
An Update Set with this Topic Block can be downloaded from Share:
- Mute legacy Instance Scan Scan Findings
---
And that's it, hope you like it.
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Platform Architect @ Quint Technology
2x ServiceNow Developer MVP
2x ServiceNow Community MVP
---
- 1,834 Views