|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<unload unload_date="2023-10-13 23:15:24"> |
| 3 | +<scan_table_check action="INSERT_OR_UPDATE"> |
| 4 | +<active>true</active> |
| 5 | +<advanced>true</advanced> |
| 6 | +<category>manageability</category> |
| 7 | +<conditions table="sys_user">internal_integration_user=true^ORweb_service_access_only=true^EQ<item goto="false" or="false" field="internal_integration_user" endquery="false" value="true" operator="=" newquery="false"/> |
| 8 | +<item goto="false" or="true" field="web_service_access_only" endquery="false" value="true" operator="=" newquery="false"/> |
| 9 | +<item goto="false" or="false" field="" endquery="true" value="" operator="=" newquery="false"/> |
| 10 | +</conditions> |
| 11 | +<description/> |
| 12 | +<documentation_url/> |
| 13 | +<finding_type>scan_finding</finding_type> |
| 14 | +<name>Integration users shouldn't be admin</name> |
| 15 | +<priority>3</priority> |
| 16 | +<resolution_details/> |
| 17 | +<run_condition/> |
| 18 | +<score_max>100</score_max> |
| 19 | +<score_min>0</score_min> |
| 20 | +<score_scale>1</score_scale> |
| 21 | +<script><![CDATA[(function (finding, current) { |
| 22 | +
|
| 23 | + var userSysId = current.getUniqueValue(); |
| 24 | + var userRoles = new GlideRecord('sys_user_has_role'); |
| 25 | + userRoles.addQuery('role.name','admin'); |
| 26 | + userRoles.addQuery('user', userSysId); |
| 27 | + userRoles.query(); |
| 28 | + |
| 29 | + if(userRoles.hasNext()){ |
| 30 | + finding.increment(); |
| 31 | + } |
| 32 | +
|
| 33 | +})(finding, current);]]></script> |
| 34 | +<short_description>Finds integration users that have assigned admin role</short_description> |
| 35 | +<sys_class_name>scan_table_check</sys_class_name> |
| 36 | +<sys_created_by>admin</sys_created_by> |
| 37 | +<sys_created_on>2023-10-13 22:59:50</sys_created_on> |
| 38 | +<sys_id>1d39dcb22ff9b110b0b62d5df699b6a2</sys_id> |
| 39 | +<sys_mod_count>5</sys_mod_count> |
| 40 | +<sys_name>Integration users shouldn't be admin</sys_name> |
| 41 | +<sys_package display_value="Global" source="global">global</sys_package> |
| 42 | +<sys_policy/> |
| 43 | +<sys_scope display_value="Global">global</sys_scope> |
| 44 | +<sys_update_name>scan_table_check_1d39dcb22ff9b110b0b62d5df699b6a2</sys_update_name> |
| 45 | +<sys_updated_by>admin</sys_updated_by> |
| 46 | +<sys_updated_on>2023-10-13 23:15:12</sys_updated_on> |
| 47 | +<table>sys_user</table> |
| 48 | +<use_manifest>false</use_manifest> |
| 49 | +</scan_table_check> |
| 50 | +</unload> |
0 commit comments