Skip to content

Commit 766c681

Browse files
authored
Merge branch 'master' into Active_approval_user
2 parents 1b05f1a + 8e6ecc1 commit 766c681

File tree

4 files changed

+138
-4
lines changed

4 files changed

+138
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ Open-Sourced community contributed and owned repository for Instance Scan Defini
1111
# Checks in this repository
1212

1313
## Category: Manageability
14-
###Inactive user check : Approvals
14+
15+
### Inactive user check: Approvals
1516
Check any approvals waiting in inactive users queue
1617

17-
###Avoid gs.log()Statement
18+
### Inactive user check: Catalog task Assigned To
19+
Check any Catalog Tasks Assigned to Inactive user
20+
21+
### Check any assets assigned to inactive user
22+
Check if any asset is assigned to inactive users.
23+
24+
### Inactive User Check: Catalog Item
25+
We should ensure that inactive users are removed from being assigned as Catalog item owners.
26+
27+
### Avoid gs.log()Statement
1828
Use Logging Levels: Instead of gs.log(), consider using more appropriate logging levels, such as:
1929
gs.info() for informative messages.
2030
gs.warn() for warnings that don’t break functionality but may need attention.
@@ -270,7 +280,8 @@ Select the check box to ignore flushing some server-side caches, thus flushing o
270280
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.
271281

272282
## Category: Security
273-
##Check Mandatory fields on incident
283+
284+
### Check Mandatory fields on incident
274285
This check is used to find mandatory fields on incident
275286

276287
### Avoid using setBasicAuth for REST messages
@@ -339,7 +350,7 @@ Scripts in ACLs ARE executed regardless of whether or not the Advanced checked b
339350
### Added a Number Prefix which already exists
340351
Creating new number records does not require uniqueness. Though having duplicate number records causes some ServiceNow core functionality not to behave as expected. For example, the search might return a record from another table the number prefix is also used on.
341352

342-
## List Inactive users from active group
353+
### List Inactive users from active group
343354
List inactive users that still belongs to activate groups
344355

345356
### HTTP connection records not excluded on clones from Prod
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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>manageability</category>
6+
<conditions table="sc_task">assigned_to.active=false^EQ<item endquery="false" field="assigned_to.active" goto="false" newquery="false" operator="=" or="false" value="false"/>
7+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
8+
</conditions>
9+
<description>Check any Catalog Tasks Assigned to Inactive user</description>
10+
<documentation_url/>
11+
<finding_type>scan_finding</finding_type>
12+
<name>Inactive user : Cat task Assignment</name>
13+
<priority>2</priority>
14+
<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 (engine) {
20+
21+
// Add your code here
22+
23+
})(engine);]]></script>
24+
<short_description>Check any Catalog Tasks Assigned to Inactive user</short_description>
25+
<sys_class_name>scan_table_check</sys_class_name>
26+
<sys_created_by>admin</sys_created_by>
27+
<sys_created_on>2024-10-31 14:50:50</sys_created_on>
28+
<sys_id>589b8c9283251210a765fecfeeaad37a</sys_id>
29+
<sys_mod_count>0</sys_mod_count>
30+
<sys_name>Inactive user : Cat task Assignment</sys_name>
31+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
32+
<sys_policy/>
33+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
34+
<sys_update_name>scan_table_check_589b8c9283251210a765fecfeeaad37a</sys_update_name>
35+
<sys_updated_by>admin</sys_updated_by>
36+
<sys_updated_on>2024-10-31 14:50:50</sys_updated_on>
37+
<table>sc_task</table>
38+
<use_manifest>false</use_manifest>
39+
</scan_table_check>
40+
<sys_translated_text action="delete_multiple" query="documentkey=589b8c9283251210a765fecfeeaad37a"/>
41+
</record_update>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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>manageability</category>
6+
<conditions table="alm_asset">assigned_to.active=false^EQ<item endquery="false" field="assigned_to.active" goto="false" newquery="false" operator="=" or="false" value="false"/>
7+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
8+
</conditions>
9+
<description>Check any asset is assigned to inactive users.</description>
10+
<documentation_url/>
11+
<finding_type>scan_finding</finding_type>
12+
<name>Inactive User check : Asset assigned to</name>
13+
<priority>2</priority>
14+
<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 (engine) {
20+
21+
// Add your code here
22+
23+
})(engine);]]></script>
24+
<short_description>Check Asset is assigned to inactive user</short_description>
25+
<sys_class_name>scan_table_check</sys_class_name>
26+
<sys_created_by>admin</sys_created_by>
27+
<sys_created_on>2024-10-31 14:22:55</sys_created_on>
28+
<sys_id>a1544896c3211210d419de1d050131e8</sys_id>
29+
<sys_mod_count>0</sys_mod_count>
30+
<sys_name>Inactive User check : Asset assigned to</sys_name>
31+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
32+
<sys_policy/>
33+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
34+
<sys_update_name>scan_table_check_a1544896c3211210d419de1d050131e8</sys_update_name>
35+
<sys_updated_by>admin</sys_updated_by>
36+
<sys_updated_on>2024-10-31 14:22:55</sys_updated_on>
37+
<table>alm_asset</table>
38+
<use_manifest>false</use_manifest>
39+
</scan_table_check>
40+
<sys_translated_text action="delete_multiple" query="documentkey=a1544896c3211210d419de1d050131e8"/>
41+
</record_update>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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>manageability</category>
6+
<conditions table="sc_cat_item">owner.active=true^EQ<item endquery="false" field="owner.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>We should ensure that inactive users are removed from being assigned as Catalog item owners.</description>
10+
<documentation_url/>
11+
<finding_type>scan_finding</finding_type>
12+
<name>Inactive user check : Catalog Item</name>
13+
<priority>2</priority>
14+
<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 (engine) {
20+
21+
// Add your code here
22+
23+
})(engine);]]></script>
24+
<short_description>Check Catalog Item owner is Active user </short_description>
25+
<sys_class_name>scan_table_check</sys_class_name>
26+
<sys_created_by>admin</sys_created_by>
27+
<sys_created_on>2024-10-31 14:09:55</sys_created_on>
28+
<sys_id>dcd18896c3211210d419de1d05013128</sys_id>
29+
<sys_mod_count>0</sys_mod_count>
30+
<sys_name>Inactive user check : Catalog Item</sys_name>
31+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
32+
<sys_policy/>
33+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
34+
<sys_update_name>scan_table_check_dcd18896c3211210d419de1d05013128</sys_update_name>
35+
<sys_updated_by>admin</sys_updated_by>
36+
<sys_updated_on>2024-10-31 14:09:55</sys_updated_on>
37+
<table>sc_cat_item</table>
38+
<use_manifest>false</use_manifest>
39+
</scan_table_check>
40+
<sys_translated_text action="delete_multiple" query="documentkey=dcd18896c3211210d419de1d05013128"/>
41+
</record_update>

0 commit comments

Comments
 (0)