Skip to content

Commit f5c52df

Browse files
authored
Merge branch 'master' into ATF_best_practices
2 parents fdd17bf + a01a2aa commit f5c52df

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_column_type_check">
2+
<scan_column_type_check action="INSERT_OR_UPDATE">
3+
<active>true</active>
4+
<category>performance</category>
5+
<column_type>script</column_type>
6+
<description>Avoid using gs.sleep() in any script because it does not release session and will cause delays, and add logs to the script whenever gs.sleep() has to be used.</description>
7+
<documentation_url>https://support.servicenow.com/kb?id=kb_article_view&amp;sysparm_article=KB0747610</documentation_url>
8+
<finding_type>scan_finding</finding_type>
9+
<name>Avoid Use of gs.sleep() in Server-side scripts</name>
10+
<priority>2</priority>
11+
<resolution_details>Use gs.eventQueueScheduled() or wait timers in workflow/flow as an altrenative approach based on the use case</resolution_details>
12+
<run_condition/>
13+
<score_max>100</score_max>
14+
<score_min>0</score_min>
15+
<score_scale>1</score_scale>
16+
<script><![CDATA[(function (engine) {
17+
18+
if (engine.columnValue.indexOf("gs.sleep()") > -1)
19+
engine.finding.increment();
20+
21+
})(engine);]]></script>
22+
<short_description>Avoid Use of gs.sleep() in Server-side scripts</short_description>
23+
<sys_class_name>scan_column_type_check</sys_class_name>
24+
<sys_created_by>nia.mccash</sys_created_by>
25+
<sys_created_on>2024-10-16 14:13:00</sys_created_on>
26+
<sys_id>57d17e91c3dd56108dbc32f1b4013125</sys_id>
27+
<sys_mod_count>3</sys_mod_count>
28+
<sys_name>Avoid Use of gs.sleep() in Server-side scripts</sys_name>
29+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
30+
<sys_policy/>
31+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
32+
<sys_update_name>scan_column_type_check_57d17e91c3dd56108dbc32f1b4013125</sys_update_name>
33+
<sys_updated_by>nia.mccash</sys_updated_by>
34+
<sys_updated_on>2024-10-16 15:00:47</sys_updated_on>
35+
</scan_column_type_check>
36+
<sys_translated_text action="delete_multiple" query="documentkey=57d17e91c3dd56108dbc32f1b4013125"/>
37+
<sys_es_latest_script action="INSERT_OR_UPDATE">
38+
<id>57d17e91c3dd56108dbc32f1b4013125</id>
39+
<sys_created_by>nia.mccash</sys_created_by>
40+
<sys_created_on>2024-10-16 14:13:00</sys_created_on>
41+
<sys_id>3d4376d1c3dd56108dbc32f1b4013112</sys_id>
42+
<sys_mod_count>0</sys_mod_count>
43+
<sys_updated_by>nia.mccash</sys_updated_by>
44+
<sys_updated_on>2024-10-16 14:13:00</sys_updated_on>
45+
<table>scan_column_type_check</table>
46+
<use_es_latest>true</use_es_latest>
47+
</sys_es_latest_script>
48+
</record_update>

0 commit comments

Comments
 (0)