Skip to content

Add new instance check definition for gs.sleep #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ Select the check box to ignore flushing some server-side caches, thus flushing o

[ Ignore cache = True: An update or insert of a system property will rebuild ONLY for that particular sys_property cache (yes, it is not a full ignore) ]

### Avoid using gs.sleep() in any server-side script
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.

## Category: Security
##Check Mandatory fields on incident
This check is used to find mandatory fields on incident
Expand Down
2 changes: 1 addition & 1 deletion ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TwPIfPENOuLil6KD5FUVu54iV2MjqWceWiQUkVELNuFs3Sq_QhkNtp-PljeTyLJy38WAf4gHwyuX8uiJYn8G8wXwz5jLOC3O20gEgcg3aF16JEHjDIjicZYr4Sd2rVtQ4AVtewUl7D3NuSxRemQbxjipqE0fNarad7iNxXLgPreuxuNmvDgd53vJVB0rE4ETm1nCa2PxdC8WKiBqIcd-v_Br9ISl8F3WDEcg3kV1o60X4hSJ-rcaEQBy8A4NozrFCOr7lQ8pVOblP2ps6XV878QSYeJVok_osAhmzcg2yk1qHoLJ18PwD2H4oycqn4ll_ZxIOcODQnkgzJ45nEHoqPKxE2ByPyUe5xodU6RWfs0_oIQPA3Ji2Z2eQg9SEl5RpkAte1McYwwVD0XAjlkXIYokaPpKHP7LSt2_iqFKMu7C87TNwFFdRzdfCpimJeq2ntMIt2Cf3635rH2xdWM9RNh_Ho1Kj7rMEj8j3u6k5M0FR4LyFsSZba3INlEAdCAgZRWohDEFBJDBp406my2awZmdWKBEI1JJVh-8UKMGEl2pnBjSVk9zZQafcx5GVqwL99a2mRgN2-dU6ozwZfIj1dI4i2ijj86Wm__itnrK8aDSka_iuYMukWveyhCpy5geYSHmnB3cjhkyI4uyoUkkllCE8jPiLarGuhrKR_4fFRg
NphMlwVg49IDN_AmbhZA_S2n4C2Ak0kx2FHZhxUGSGGxUbqgZMunGHiqZzRmFpvjBevGWNbaflHkL2XtSDBN4OyJbkF2BqC_swBzwqMIAVV449V_huL8FUWbgEpPvhHD2uyLtmpJR4q4WfEjJzmjWQnXFksmQtAHDFZp7M4XpWRfyFc_r05eE9u10khR0-YcO18-wKcYnWt4sJGYiyZhzioxcrb_D8yHEfrX6CAJUaQUy79-ADc9GNx6LJSw9MdryaoB1idOH2U5-FRpcwwxHmY2AxV7c7DBvuGz7JKQD_KGjoClwWGb64Cm0Nbzh3IHYibnbJ7kabppL5LbMsnlURkBdTF67Mgm-IgasNyunYfcSpdbZSV7_hmB5CjJ0MH2y8HAIr105Y1Tx71M-O4dd_bh7w5xIlslgatPf3fUQ7r85nbd-OUY6Tpw7WJtbk5qTaxPKcWZBdB1OVL__9pYW7_9UxcOdlehuflVEqixu89Jv3IyvP9JT8m-RJqZDU0J61y90w07smRDIv0DDXgNHbfuENQ6Zb48wIEY77h3Jg40h6NqiNEkx_P8RZLC3eC3r4kwFEbdvW-XKmebx5SKiXwfSzqez8v6wYhf5GVI-QmnJEBeus9roO2nh43hEJ-lMuBni_JjjXcENBcwcxj8-oRBWhHrukHwcPU80N7F-mY
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
<scan_table_check action="INSERT_OR_UPDATE">
<active>true</active>
<advanced>false</advanced>
<category>performance</category>
<conditions table="sysevent_in_email_action">scriptLIKEgs.sleep^EQ<item endquery="false" field="script" goto="false" newquery="false" operator="LIKE" or="false" value="gs.sleep"/>
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
</conditions>
<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>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>Avoid use of gs.sleep() in server-side scripts</name>
<priority>1</priority>
<resolution_details>Use gs.eventQueueScheduled() or wait timers in workflow/flow as an altrenative approach based on the use case</resolution_details>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (engine) {

// Add your code here

})(engine);]]></script>
<short_description>Avoid using gs.sleep() in any server-side script</short_description>
<sys_class_name>scan_table_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-09 08:18:54</sys_created_on>
<sys_id>76dc11c747011210b8ca0b02d16d439a</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_name>Avoid use of gs.sleep() in server-side scripts</sys_name>
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
<sys_policy/>
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
<sys_update_name>scan_table_check_76dc11c747011210b8ca0b02d16d439a</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-09 08:18:54</sys_updated_on>
<table>sysevent_in_email_action</table>
<use_manifest>false</use_manifest>
</scan_table_check>
<sys_translated_text action="delete_multiple" query="documentkey=76dc11c747011210b8ca0b02d16d439a"/>
</record_update>
Loading