Skip to content

Commit d5532a3

Browse files
authored
Merge branch 'master' into aswamy93_updates
2 parents 020fbeb + 3e765c6 commit d5532a3

File tree

4 files changed

+142
-1
lines changed

4 files changed

+142
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Variables should be used in Catalog Item or a Variable Set. Variables not in us
100100
### Delete Orphaned Catalog Client Scripts
101101
Catalog Client Script should be used in either a Catalog Item or a Variable Set. Catalog Client Scripts not in use should be deleted.
102102

103-
### Update set description should not be empty
103+
### Delete Orphaned Catalog UI Policies
104104
Catalog UI policy should be used in either a Catalog Item or a Variable Set. Catalog UI Policies not in use should be deleted.
105105

106106
### Client Script Business rule or Script Include should not have an empty description or be without comments in the script section
@@ -146,6 +146,9 @@ During the time it can be a situation that person is no longer active in the sys
146146
### Unsupported API GlideLDAP
147147
GlideLDAP API usage is unsupported by ServiceNow and hence should be avoided, rather use LDAP Server Data Sources to pull data from LDAP via MID Server or directly through an internet facing LDAP.
148148

149+
### Check for Orphaned Tickets
150+
Tickets from tables such as Incident, Change Request, Problem, and other task-related tables should always have an Assignment Group specified. These tickets represent issues or requests that require attention and action. Leaving the Assignment Group field empty can result in unresolved issues or delays in implementing fixes, as no team will be accountable for the resolution. Since the Assignment Group is meant to designate the responsible team for managing these tickets, it should not be left blank.
151+
149152

150153
## Category: Upgradability
151154

@@ -306,6 +309,9 @@ In general, variables in JavaScript should be properly declared (e.g. using “v
306309
### Don't show unpublished knowledge articles
307310
Unpublished knowledge articles may contain sensitive information that should not be visible to anyone with read access. By preventing access to unpublished articles, reviewers are given the opportunity to verify the content before it is made accessible. This ensures that only properly reviewed and approved information is available to users with read access.
308311

312+
### Scripts in ACLs should be cleared when Advanced is not checked
313+
Scripts in ACLs ARE executed regardless of whether or not the Advanced checked box is checked off. As such, unnecessary scripts should be cleared from the field OR the Advanced checkbox should be checked in cases where scripts are required to provide better visibility to admins for troubleshooting purposes.
314+
309315
## Category: User Experience
310316

311317
### Added a Number Prefix which already exists
@@ -325,6 +331,9 @@ It is recommended to use an OOB library for modals in order to improve the user
325331
### Use "last run datetime" for JDBC data loads
326332
In your JDBC data load configuration, ensure that the 'last run datetime' option is set to true and configure the target database field to serve as a timestamp, as this best practice enables incremental data loading and improves performance in data integration processes using JDBC.
327333

334+
### Use of setWorkflow(false) in business rules will cause unexpected issues
335+
As setWorkflow(false) method will stop the execution of business rules on that particular GlideRecord object, this will result in unexpected behaviour where the execution of business rules skipped. Maintain caution while using this method and perform regression testing to avoid possible risk. It can have noticeable impact on Audit, Journal fields, notifications, SLA engine, workflow, flow engine etc.,
336+
328337
# Additional resources
329338

330339
Please check these additional links for more information and details:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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>false</advanced>
5+
<category>upgradability</category>
6+
<conditions table="sys_dictionary">internal_type=reference^reference=sys_choice^EQ<item display_table="sys_glide_object" display_value="Reference" endquery="false" field="internal_type" goto="false" newquery="false" operator="=" or="false" value="reference"/>
7+
<item endquery="false" field="reference" goto="false" newquery="false" operator="=" or="false" value="sys_choice"/>
8+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
9+
</conditions>
10+
<description>The Choice table should not be used as the reference table for a Reference type field. Reference fields store the sys_id of the corresponding record in the reference table and show the specified display value. For example: the caller_id field stores the sys_id of a record from the user table and displays the corresponding name value. This presents a problem when using the sys_choice table, because existing records are deleted and replaced when choices are modified. This causes a new sys_id to be generated for each record in the choice list. So the sys_id stored in the Reference field is no longer a valid value and the reference is broken.</description>
11+
<documentation_url>https://support.servicenow.com/kb?id=kb_article_view&amp;sysparm_article=KB0813643</documentation_url>
12+
<finding_type>scan_finding</finding_type>
13+
<name>Do not reference sys_choice table</name>
14+
<priority>3</priority>
15+
<resolution_details/>
16+
<run_condition/>
17+
<score_max>100</score_max>
18+
<score_min>0</score_min>
19+
<score_scale>1</score_scale>
20+
<script><![CDATA[(function (engine) {
21+
22+
// Add your code here
23+
24+
})(engine);]]></script>
25+
<short_description>Do not reference sys_choice table</short_description>
26+
<sys_class_name>scan_table_check</sys_class_name>
27+
<sys_created_by>ronald.karim</sys_created_by>
28+
<sys_created_on>2024-10-04 19:35:57</sys_created_on>
29+
<sys_id>6b1a4ee9c34d9210193f37cc0501312e</sys_id>
30+
<sys_mod_count>0</sys_mod_count>
31+
<sys_name>Do not reference sys_choice table</sys_name>
32+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
33+
<sys_policy/>
34+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
35+
<sys_update_name>scan_table_check_6b1a4ee9c34d9210193f37cc0501312e</sys_update_name>
36+
<sys_updated_by>ronald.karim</sys_updated_by>
37+
<sys_updated_on>2024-10-04 19:35:57</sys_updated_on>
38+
<table>sys_dictionary</table>
39+
<use_manifest>false</use_manifest>
40+
</scan_table_check>
41+
<sys_translated_text action="delete_multiple" query="documentkey=6b1a4ee9c34d9210193f37cc0501312e"/>
42+
</record_update>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 table="incident">active=true^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
7+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
8+
</conditions>
9+
<description>Tickets from tables such as Incident, Change Request, Problem, and other task-related tables should always have an Assignment Group specified. These tickets represent issues or requests that require attention and action. Leaving the Assignment Group field empty can result in unresolved issues or delays in implementing fixes, as no team will be accountable for the resolution. Since the Assignment Group is meant to designate the responsible team for managing these tickets, it should never be left blank.</description>
10+
<documentation_url/>
11+
<finding_type>scan_finding</finding_type>
12+
<name>Check for Orphaned tickets</name>
13+
<priority>2</priority>
14+
<resolution_details>Identify the records with emopty assignment group and assign them to respective assignment groups so that they can work on the tickets and to further prevent it try creating assignment lookup rules</resolution_details>
15+
<run_condition/>
16+
<score_max>100</score_max>
17+
<score_min>0</score_min>
18+
<score_scale>1</score_scale>
19+
<script><![CDATA[(function(finding, current) {
20+
var IncID = current.getValue('sys_id');
21+
var inc = new GlideRecord('incident');
22+
inc.addQuery('sys_id', IncID);
23+
inc.addEncodedQuery("assignment_group!=null");
24+
if (!inc.hasNext()) {
25+
finding.increment();
26+
}
27+
})(finding, current);]]></script>
28+
<short_description>Tickets from Incident table should have assignment group specified.</short_description>
29+
<sys_class_name>scan_table_check</sys_class_name>
30+
<sys_created_by>admin</sys_created_by>
31+
<sys_created_on>2024-10-07 18:22:05</sys_created_on>
32+
<sys_id>7334dda283455210ae0854b6feaad378</sys_id>
33+
<sys_mod_count>9</sys_mod_count>
34+
<sys_name>Check for Orphaned tickets</sys_name>
35+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
36+
<sys_policy/>
37+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
38+
<sys_update_name>scan_table_check_7334dda283455210ae0854b6feaad378</sys_update_name>
39+
<sys_updated_by>admin</sys_updated_by>
40+
<sys_updated_on>2024-10-07 18:33:38</sys_updated_on>
41+
<table>incident</table>
42+
<use_manifest>false</use_manifest>
43+
</scan_table_check>
44+
<sys_translated_text action="delete_multiple" query="documentkey=7334dda283455210ae0854b6feaad378"/>
45+
</record_update>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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>false</advanced>
5+
<category>security</category>
6+
<conditions table="sys_security_acl">advanced=false^scriptISNOTEMPTY^active=true^EQ<item endquery="false" field="advanced" goto="false" newquery="false" operator="=" or="false" value="false"/>
7+
<item endquery="false" field="script" goto="false" newquery="false" operator="ISNOTEMPTY" or="false" value=""/>
8+
<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
9+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
10+
</conditions>
11+
<description>Scripts in ACLs ARE executed regardless of whether or not the Advanced checked box is checked off. As such, unnecessary scripts should be cleared from the field OR the Advanced checkbox should be checked in cases where scripts are required to provide better visibility to admins for troubleshooting purposes.</description>
12+
<documentation_url>https://docs.servicenow.com/csh?topicname=t_CreateAnACLRule.html&amp;version=latest</documentation_url>
13+
<finding_type>scan_finding</finding_type>
14+
<name>Scripts in ACLs Should be Cleared when Advanced is not checked</name>
15+
<priority>3</priority>
16+
<resolution_details>Clear the Script box data if the script is unnecessary and Advanced is not checked off&#13;
17+
OR&#13;
18+
Check off the Advanced check box if there is a script in the Script box that is required for the ACL.</resolution_details>
19+
<run_condition/>
20+
<score_max>100</score_max>
21+
<score_min>0</score_min>
22+
<score_scale>1</score_scale>
23+
<script><![CDATA[(function (engine) {
24+
25+
// Add your code here
26+
27+
})(engine);]]></script>
28+
<short_description>Scripts in ACLs Should be Cleared when Advanced is not checked</short_description>
29+
<sys_class_name>scan_table_check</sys_class_name>
30+
<sys_created_by>nia.mccash</sys_created_by>
31+
<sys_created_on>2024-10-08 20:03:00</sys_created_on>
32+
<sys_id>9d4676f6c34d52d08dbc32f1b4013165</sys_id>
33+
<sys_mod_count>0</sys_mod_count>
34+
<sys_name>Scripts in ACLs Should be Cleared when Advanced is not checked</sys_name>
35+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
36+
<sys_policy/>
37+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
38+
<sys_update_name>scan_table_check_9d4676f6c34d52d08dbc32f1b4013165</sys_update_name>
39+
<sys_updated_by>nia.mccash</sys_updated_by>
40+
<sys_updated_on>2024-10-08 20:03:00</sys_updated_on>
41+
<table>sys_security_acl</table>
42+
<use_manifest>false</use_manifest>
43+
</scan_table_check>
44+
<sys_translated_text action="delete_multiple" query="documentkey=9d4676f6c34d52d08dbc32f1b4013165"/>
45+
</record_update>

0 commit comments

Comments
 (0)