|
| 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>performance</category> |
| 6 | + <conditions table="sys_dictionary">internal_type=string^ORinternal_type=string_full_utf8^max_length>4000^nameNOT LIKEsys_hub^EQ<item display_table="sys_glide_object" display_value="String" endquery="false" field="internal_type" goto="false" newquery="false" operator="=" or="false" value="string"/> |
| 7 | + <item endquery="false" field="internal_type" goto="false" newquery="false" operator="=" or="true" value="string_full_utf8"/> |
| 8 | + <item endquery="false" field="max_length" goto="false" newquery="false" operator=">" or="false" value="4000"/> |
| 9 | + <item endquery="false" field="name" goto="false" newquery="false" operator="NOT LIKE" or="false" value="sys_hub"/> |
| 10 | + <item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/> |
| 11 | + </conditions> |
| 12 | + <description>This scan checks for string fields where the max_length value is set above a recommended limit. Setting a very high max_length can result in unnecessary database storage consumption and may degrade query performance. It is important to use reasonable max_length values based on actual data requirements.</description> |
| 13 | + <documentation_url>https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779</documentation_url> |
| 14 | + <finding_type>scan_finding</finding_type> |
| 15 | + <name>String Fields with Excessive Max Length</name> |
| 16 | + <priority>3</priority> |
| 17 | + <resolution_details>Review the identified string fields and adjust the max_length to a value that matches the actual data requirements. |
| 18 | + |
| 19 | +Use lower values for fields that only need to store short text. For fields that may contain longer content, consider using appropriate max_length values, such as 255 for typical text fields. |
| 20 | + |
| 21 | +Avoid setting max_length values unnecessarily high to reduce the impact on storage and performance.</resolution_details> |
| 22 | + <run_condition/> |
| 23 | + <score_max>100</score_max> |
| 24 | + <score_min>0</score_min> |
| 25 | + <score_scale>1</score_scale> |
| 26 | + <script><![CDATA[(function(finding) { |
| 27 | +
|
| 28 | +})(finding); |
| 29 | +]]></script> |
| 30 | + <short_description>Identifies string fields with max_length exceeding recommended limits</short_description> |
| 31 | + <sys_class_name>scan_table_check</sys_class_name> |
| 32 | + <sys_created_by>admin</sys_created_by> |
| 33 | + <sys_created_on>2024-10-15 21:43:15</sys_created_on> |
| 34 | + <sys_id>8b90df49839112107b681390ceaad3be</sys_id> |
| 35 | + <sys_mod_count>6</sys_mod_count> |
| 36 | + <sys_name>String Fields with Excessive Max Length</sys_name> |
| 37 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 38 | + <sys_policy/> |
| 39 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 40 | + <sys_update_name>scan_table_check_8b90df49839112107b681390ceaad3be</sys_update_name> |
| 41 | + <sys_updated_by>admin</sys_updated_by> |
| 42 | + <sys_updated_on>2024-10-15 22:11:06</sys_updated_on> |
| 43 | + <table>sys_dictionary</table> |
| 44 | + <use_manifest>false</use_manifest> |
| 45 | + </scan_table_check> |
| 46 | + <sys_translated_text action="delete_multiple" query="documentkey=8b90df49839112107b681390ceaad3be"/> |
| 47 | +</record_update> |
0 commit comments