|
| 1 | +<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check"> |
| 2 | + <scan_table_check action="INSERT_OR_UPDATE"> |
| 3 | + <active>true</active> |
| 4 | + <advanced>true</advanced> |
| 5 | + <category>manageability</category> |
| 6 | + <conditions/> |
| 7 | + <description>Having two Update Sets with the same name in ServiceNow makes it hard to debug and track changes.</description> |
| 8 | + <documentation_url/> |
| 9 | + <finding_type>scan_finding</finding_type> |
| 10 | + <name>Duplicate Updat Set Name</name> |
| 11 | + <priority>3</priority> |
| 12 | + <resolution_details>Ensure all your Update sets have unique names. Rename any update set with a duplicate name with a unique name</resolution_details> |
| 13 | + <run_condition/> |
| 14 | + <score_max>100</score_max> |
| 15 | + <score_min>0</score_min> |
| 16 | + <score_scale>1</score_scale> |
| 17 | + <script><![CDATA[(function(finding, current) { |
| 18 | +
|
| 19 | +// gs.info(current.api_name); |
| 20 | +// gs.info('Checking script Include name: ' + current.api_name); |
| 21 | + var ga = new GlideAggregate('sys_update_set'); |
| 22 | + ga.addQuery('name', current.name); |
| 23 | + ga.addQuery('sys_id', '!=', current.sys_id); |
| 24 | + ga.addAggregate('COUNT'); |
| 25 | + ga.query(); |
| 26 | + ga.next(); |
| 27 | +
|
| 28 | + if (ga.getAggregate('COUNT') >= 1) { |
| 29 | + finding.increment(); |
| 30 | + finding.count = ga.getAggregate('COUNT'); |
| 31 | + } |
| 32 | +})(finding, current);]]></script> |
| 33 | + <short_description>Duplicate Updateset Names</short_description> |
| 34 | + <sys_class_name>scan_table_check</sys_class_name> |
| 35 | + <sys_created_by>admin</sys_created_by> |
| 36 | + <sys_created_on>2024-10-19 11:29:09</sys_created_on> |
| 37 | + <sys_id>b68a2d5ac3111210eb11ba2ed40131fa</sys_id> |
| 38 | + <sys_mod_count>2</sys_mod_count> |
| 39 | + <sys_name>Duplicate Updat Set Name</sys_name> |
| 40 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 41 | + <sys_policy/> |
| 42 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 43 | + <sys_update_name>scan_table_check_b68a2d5ac3111210eb11ba2ed40131fa</sys_update_name> |
| 44 | + <sys_updated_by>admin</sys_updated_by> |
| 45 | + <sys_updated_on>2024-10-19 11:33:53</sys_updated_on> |
| 46 | + <table>sys_update_set</table> |
| 47 | + <use_manifest>false</use_manifest> |
| 48 | + </scan_table_check> |
| 49 | + <sys_translated_text action="delete_multiple" query="documentkey=b68a2d5ac3111210eb11ba2ed40131fa"/> |
| 50 | + <sys_es_latest_script action="INSERT_OR_UPDATE"> |
| 51 | + <id>b68a2d5ac3111210eb11ba2ed40131fa</id> |
| 52 | + <sys_created_by>admin</sys_created_by> |
| 53 | + <sys_created_on>2024-10-19 11:32:10</sys_created_on> |
| 54 | + <sys_id>033b619ac3111210eb11ba2ed40131d0</sys_id> |
| 55 | + <sys_mod_count>0</sys_mod_count> |
| 56 | + <sys_updated_by>admin</sys_updated_by> |
| 57 | + <sys_updated_on>2024-10-19 11:32:10</sys_updated_on> |
| 58 | + <table>scan_table_check</table> |
| 59 | + <use_es_latest>false</use_es_latest> |
| 60 | + </sys_es_latest_script> |
| 61 | +</record_update> |
0 commit comments