Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Open-Sourced community contributed and owned repository for Instance Scan Defini

## Category: Manageability

###Avoid gs.log()Statement
Use Logging Levels: Instead of gs.log(), consider using more appropriate logging levels, such as:
gs.info() for informative messages.
gs.warn() for warnings that don’t break functionality but may need attention.
gs.error() for logging errors that require investigation.

### Avoid using javascript "document" object in Portal
Always avoid using native js "document" object for DOM manipulation in service portal. Instead we should use AngularJS equivalent capabilities to achieve the same.

Expand Down
2 changes: 1 addition & 1 deletion ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vdzK57T2bhYH4R3tr5_N6r8DKdLmhtc5_AMSqsrGL2lDDQtzZxnmirx38up8Jm2-CI3CDMpa7Udq0cV06a0WfIeCBFsws8y-joYHTxiD-lAbbpy7LKyBy-szR_kO4mFszdz7Kikp9bbMUwWTIPbtRQzbapfu6HH7iEFepuUdA9SOlwPJAAaBRxCUQeo8Hg9Hxb7ubHmvx87l7IwoGN2ezq07g2EMDh3wkpLdXVXdMoPd-Hf9g8X-V4ENLaGI-5wQnvXgX_w_shWoupz_WdTA3ir94Eh3Nu2jiM29wNQDNrlsTvslryId4vq8M8ME13Vi7UpuHw6Ec-ooT6OXdBMkvgsVAtCARdy79UbAgT_p9E3KL3rbJPozp-7I8wOf3n1WETwJkDsAUMzBp3LWF8_BqfxFeYFCEQV3l3xC8ic2ZQn_98i9fpgURFU9Ec2BEGbbMfpm7KehrFl0bNOVDTDEWIETdt80lvfR1i0-8Yk1vHWvLdB94dHoPw1a77oWht1HxEMkNzE1m38ANVQVZq2-pbVdIiAYCLeRBdd5i_LrNLpF7iCHBpAawuxX5BQIVKBW3WNTPhWUdV9_a1_394CDBmYswn8XiQSx0Vi0hfjuuMp9J9sQxOVVq2MFyWZiDvhIX2CJutq8xn27shQc7Y5xeZN5SVosFrv3irWYkzJuKoU
FFSb285LVQLVwwSy1sN9TSS_xgKMdxMueRetT0HDGeIrQsCSVVqvJzq4M3L_pFYItVzRNDhnJyUVmYX7kiDXTToGUlLA1bTP6qfEDtDOKAjH87dpFAYY0oCn-BigJNe6f5mwNAGVBXr3LuZsGmtUK_ximdlxUEYd2DZxoRROrqzIDgwXIAvh0-j8KEYoBGFnBral4LH5FhuzlJImUAh098OvSvclL5NbEYBf4VBqcQZvIP0u2vboUXo2rJ16Kn3iNtzuxPYimD5mfRTRkV7zFDIUxiwGXxf7ncKbO3VZh7DcKeHkGN1Y1RSR1Q_3KyIwoW0YLyKn22G80MIiVx__BKyrof0MY632nGIwHhAstzV83wEoStOilvUdjSJKPNxx9aAft3baZjboj6P8La47D0rfw5lgqOIHq1TnThxjiAlBctfD78qPrva7lfQmipEPZuFHfrKqJ32T_MbAug2xxmt22tnbKCDBDfw8MUc5v3nprsHYFFewiMuZflFHhISDzjSPs2TIy60TrSISouTfVY-p4IgG_v-eSXage9wzpvjoHQZnMwvZrePEtW62OkG8TmD86uZtWTHlPYo2Prj1OGaXZRGHvd3K4bbdtwOWKq9exXozy83yl_w_U3ich8kLj1LuppKxCmMQVEnPvUSdxqwtkqGidBLqZKTcVLCFqJc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_script_only_check">
<scan_script_only_check action="INSERT_OR_UPDATE">
<active>true</active>
<category>upgradability</category>
<description>Use Logging Levels: Instead of gs.log(), consider using more appropriate logging levels, such as:&#13;
gs.info() for informational messages.&#13;
gs.warn() for warnings that don’t break functionality but may need attention.&#13;
gs.error() for logging errors that require investigation.</description>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>Avoid usage of gs.log()</name>
<priority>3</priority>
<resolution_details/>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (finding, columnValue) {
var matches = columnValue.match(/gs\.log\s*\(/g);

if (matches) {
matches.forEach(function(element) {
finding.increment();
});
}
})(finding, columnValue);]]></script>
<short_description>Avoid usage of gs.log() in prod</short_description>
<sys_class_name>scan_script_only_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-18 02:30:31</sys_created_on>
<sys_id>6b832a7953d1d61000b51901a0490e24</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_name>Avoid usage of gs.log()</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_script_only_check_6b832a7953d1d61000b51901a0490e24</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-18 02:30:31</sys_updated_on>
</scan_script_only_check>
<sys_translated_text action="delete_multiple" query="documentkey=6b832a7953d1d61000b51901a0490e24"/>
<sys_es_latest_script action="INSERT_OR_UPDATE">
<id>6b832a7953d1d61000b51901a0490e24</id>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-18 02:30:31</sys_created_on>
<sys_id>07a5a23953d1d61000b51901a0490e95</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-18 02:30:31</sys_updated_on>
<table>scan_script_only_check</table>
<use_es_latest>true</use_es_latest>
</sys_es_latest_script>
</record_update>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
<scan_table_check action="INSERT_OR_UPDATE">
<active>true</active>
<advanced>true</advanced>
<category>manageability</category>
<conditions table="sys_properties">name=sn_atf.runner^value=false^EQ<item endquery="false" field="name" goto="false" newquery="false" operator="=" or="false" value="sn_atf.runner"/>
<item endquery="false" field="value" goto="false" newquery="false" operator="=" or="false" value="false"/>
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
</conditions>
<description/>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>ATF usage instance</name>
<priority>2</priority>
<resolution_details/>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (finding, current) {
// Checks if we are in a non-production instance
if (gs.getProperty("glide.installation.production") === "false")
finding.increment();

})(finding, current);]]></script>
<short_description>Checking ATFs are using in Non production instances.</short_description>
<sys_class_name>scan_table_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-16 14:19:07</sys_created_on>
<sys_id>6f14fe555359161000b51901a0490ef9</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_name>ATF usage instance</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_6f14fe555359161000b51901a0490ef9</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-16 14:19:07</sys_updated_on>
<table>sys_properties</table>
<use_manifest>false</use_manifest>
</scan_table_check>
<sys_translated_text action="delete_multiple" query="documentkey=6f14fe555359161000b51901a0490ef9"/>
<sys_es_latest_script action="INSERT_OR_UPDATE">
<id>6f14fe555359161000b51901a0490ef9</id>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-16 14:19:06</sys_created_on>
<sys_id>57a4ba915359161000b51901a0490e13</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-16 14:19:06</sys_updated_on>
<table>scan_table_check</table>
<use_es_latest>true</use_es_latest>
</sys_es_latest_script>
</record_update>