Skip to content
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

Find Orphan UI Policies #182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vqS62dwsHOftj0lK7PR87gomw2pIhK44opT0jPKRyjaGenHOsrTkyPCKzQ7rEUQHL5wJzSlMh2o7sx36ilRDd4i88RNzKdRmZQrAE43MBZiIP0vH5yIkRc9lrfiqlfrqlDa5QTwro6H3y4_p_S4sJaGSnLteaAJVb5sn7kboEKpPAvpdV8cgu-rlAKAzB9vegqMVyfgzrzzPlsZhChJpJZzGaqAhnN8h8VY1CH05130BFPqoo1M4DPdLevgSBoH_Hdx1UI4gh7XNIc722PYxnWc-suyoupr9vJk1mHKv0TtIG1UVf1UdlYuLplbA83Xjv-BGOzuHYCCBHy6DG97PjEYe_dHt5OE_51l59nDazeJXpYqQUQ21dEF4pnh1ZkKf3opqlxB7cHRtDL4-Fvj0HKemx8WjSoDC2ww_kGolUrR8KNWIewMS8de65BZMOFuvi0DvA2M0RjNSdxtDtGuJbGfd1gXuk8EO8B69uuyTDBD1q7hzowaVGXALNqKfLEk_BqsTv03-3sX1AAC7lU2VNjqCcESKEPimlLbYEh2xZUySwNJ3nsugjviNfHsGofds0xUjVfNJEoQtqEOu3VfMFK0zufXyLkCxLH-HFKwAy1tb2_Z0RvVK8MhrHfcqE5dQSbGTpOKW4J-OR939_Vx2KD1hwu901aNQmO6NMN5ix2c
5PG25HpEKcJCUP-biGpvEGRPf783JM87l8Ao42hVi0-6yJVXbfpPoEqdFpgjfoikhmuqGIOzkRe-Aw4L0OLumIiynwMaifQIM6zrXH7NQMkyLbAw3vbxAWUNQRp4t3fMUsNz1Fye2LE6BAKDE7BXvec5OQgQ1ZbXqNPY8ZlnSnQ63kLOJzBWSpNOAhlQlmQOv7ligWuspvE-d1yrq90smsI56nRbdVPzjxuCOZUPluhMr7_1yp0fTOp_NE1M86SnnE9n8cRTGxKoRNucl8ra80nwnGJShjAhtOCSUUhCQH6fJtmb7hbBgt952WBYFSG7PvnqAfm42_bZ_8lIpj8q7B8vwbPHyq9N87FaZ0Q7xQfx9C0L9kDq3WNUAJqwvHTVwlB0npV93xcCIK12kz6F_RVPi-YeyMCInb2eUxuGDGxVlxTUT_DeGiW-W9O8YhtcyTcs3K5zljhUtaJg2geM7fxpPh7V9q81QRR-HraZBjxWH3rzdZljwJUa_x6ONnydmis3Czl1y7lsWEBpYeFbSiVWT8_KdXzcS_tAg9_JCH8l5r4sYc9NWGWhNULUkj0X1kUcGyc3Gj8id37u7WwwC9g4zpXHRDh_B9icQKv1teUYUg_OmdusEU6xwiR-VwpCJ2Pq7PkxY45_Q_9yuTk4mNm7B5r3rkRMw0H9XtN4OnA
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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_ui_policy">active=true^run_scripts=false^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
<item endquery="false" field="run_scripts" goto="false" newquery="false" operator="=" or="false" value="false"/>
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
</conditions>
<description>UI policy should have any UI Policy Action defined</description>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>Orphaned UI Policies</name>
<priority>3</priority>
<resolution_details>If UI policy is not in use, it should be deleted or made inactive</resolution_details>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (finding, current) {

var policyAction = new GlideRecord("sys_ui_policy_action");
policyAction.addQuery("ui_policy", current.sys_id);
if(!policyAction.hasNext()){
finding.increment();
}


})(engine);]]></script>
<short_description>Orphaned UI Policies</short_description>
<sys_class_name>scan_table_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-11-01 11:38:07</sys_created_on>
<sys_id>81492c6ac321121095ac1173e40131bf</sys_id>
<sys_mod_count>1</sys_mod_count>
<sys_name>Orphaned UI Policies</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_81492c6ac321121095ac1173e40131bf</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-11-01 11:41:25</sys_updated_on>
<table>sys_ui_policy</table>
<use_manifest>false</use_manifest>
</scan_table_check>
<sys_translated_text action="delete_multiple" query="documentkey=81492c6ac321121095ac1173e40131bf"/>
<sys_es_latest_script action="INSERT_OR_UPDATE">
<id>81492c6ac321121095ac1173e40131bf</id>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-11-01 11:41:24</sys_created_on>
<sys_id>090aaceac321121095ac1173e401311f</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-11-01 11:41:24</sys_updated_on>
<table>scan_table_check</table>
<use_es_latest>false</use_es_latest>
</sys_es_latest_script>
</record_update>
Loading