Skip to content

Commit b2eaebc

Browse files
authored
Merge pull request #24 from fn20200323/master
Check for inactive admin users
2 parents ae8b485 + 96c283c commit b2eaebc

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ Improper use of eval() opens up your code for injection attacks and difficulties
115115
### Do not use gr as a variable name
116116
The platform is Javascript and a lot of code is run in a global variable scope. A "gr" defined in one business rule can clobber another "gr" defined in some other script.
117117

118+
### Admins not logged in for 1 month
119+
Monitor users with role `admin` (not locked out) that are not logged for longer than 1 month
120+
118121
## Category: User Experience
119122

120123

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<unload unload_date="2021-10-19 22:38:23">
3+
<scan_table_check action="INSERT_OR_UPDATE">
4+
<active>true</active>
5+
<advanced>false</advanced>
6+
<category>security</category>
7+
<conditions table="sys_user">locked_out=false^roles=admin^last_login_timeRELATIVELT@month@ago@1^ORlast_login_timeISEMPTY^EQ<item goto="false" or="false" field="locked_out" endquery="false" value="false" operator="=" newquery="false"/>
8+
<item goto="false" or="false" field="roles" endquery="false" value="admin" operator="=" newquery="false"/>
9+
<item goto="false" or="false" field="last_login_time" endquery="false" value="LT@month@ago@1" operator="RELATIVE" newquery="false"/>
10+
<item goto="false" or="true" field="last_login_time" endquery="false" value="" operator="ISEMPTY" newquery="false"/>
11+
<item goto="false" or="false" field="" endquery="true" value="" operator="=" newquery="false"/>
12+
</conditions>
13+
<description/>
14+
<documentation_url/>
15+
<finding_type>scan_finding</finding_type>
16+
<name>Admins not logged in for 1 month</name>
17+
<priority>2</priority>
18+
<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>List users with admin role that were inactive for at least 1 month</short_description>
29+
<sys_class_name>scan_table_check</sys_class_name>
30+
<sys_created_by>admin</sys_created_by>
31+
<sys_created_on>2021-10-19 21:45:37</sys_created_on>
32+
<sys_id>22a8ebad2fd3301036c51e282799b6b4</sys_id>
33+
<sys_mod_count>1</sys_mod_count>
34+
<sys_name>Admins not logged in for 1 month</sys_name>
35+
<sys_package display_value="Global" source="global">global</sys_package>
36+
<sys_policy/>
37+
<sys_scope display_value="Global">global</sys_scope>
38+
<sys_update_name>scan_table_check_22a8ebad2fd3301036c51e282799b6b4</sys_update_name>
39+
<sys_updated_by>admin</sys_updated_by>
40+
<sys_updated_on>2021-10-19 22:36:47</sys_updated_on>
41+
<table>sys_user</table>
42+
<use_manifest>false</use_manifest>
43+
</scan_table_check>
44+
</unload>

0 commit comments

Comments
 (0)