Skip to content

Commit 7a30a9e

Browse files
Implemented a check to determine if unpublished knowledge articles are accessible. (#118)
* Implemented a check to determine if unpublished knowledge articles are accessible. * Added new instance scan description to readme
1 parent ee25a7c commit 7a30a9e

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ Use GlideRecordSecure API to ensure the security checks are performed and unauth
300300
### For loop iterators "i" should be declared
301301
In general, variables in JavaScript should be properly declared (e.g. using “var”). The declaration defines the scope of the variable, ensuring it's accessible only within the intended block. This prevents unintended variable pollution and conflicts. Especially in for loops, often an iterator “i” is used and not properly declared. For example “for (i=0; i<10; i++)” instead of “for (var i=0; i<10; i++)”. As a result, this could unintentionally alter the value of other 'i' iterators in different for loops.
302302

303+
### Don't show unpublished knowledge articles
304+
Unpublished knowledge articles may contain sensitive information that should not be visible to anyone with read access. By preventing access to unpublished articles, reviewers are given the opportunity to verify the content before it is made accessible. This ensures that only properly reviewed and approved information is available to users with read access.
305+
303306
## Category: User Experience
304307

305308
### Added a Number Prefix which already exists
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GMk-wMVtcl0e4HaeuZQZANxo2HAMeWyfhL8rbFLl_woCVyXOjsXdR7O1LSNRPaNARvxgRvjRsKeUMqXi-LPK4EoClDxNqk3Wx6qpPBGYVmhF9S7jsLROWoO5Rj1jiSisMbIsOVFuPN_ts_kAcUOlpwRSywuUD0Go7N2jHUFGg45f63KMtuZQRGtfAWwxSNNpZ9gtoq4JYulVrcmKdf_bKDyX1bSlzCzeXiL8ezaAI_l2Zj2hHdxsqF5hUEZLNFugquKGb_fR7WLoPsz2a8dJejAFgKLGI_Foz1ZekVncgM8k0Kbx13zj8ZYdn5BVnKE6gLQL12k2cr6Xr6ohpUJrLHpEdBaLri5zcAhQo35qtifNeIzKxZrfkoG72CJ2rgXkbjXwZjxVbQtwN1beAznnjjsw3nmQ7DyR3ytpRq_8X1nTg9NZ7qwmp8iYFEGm3A9vaZ2Gan1bgkcvFG5Kne80TqOTh2ev1oTZ1YI1xKYa7fQutdvMPSt-MEr5oj8Eu3uxtn0RVcKVMXOEh5WSDEBB69BmLGm1GIggD9gpCY6-a3_tvQ8Eb5CycVyH02LWYkgZJJOhB0ueIUo-_ldLl7BmTynkXFF0zouPxPQdKYb5jNfzXRi5p-okzqjdDsHP5XnV8ZnyEs_xdvSQHTHCnr7-AxjdnvzPtCTKH5mFzbLhID4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_script_only_check">
2+
<scan_script_only_check action="INSERT_OR_UPDATE">
3+
<active>true</active>
4+
<category>security</category>
5+
<description>Unpublished knowledge articles may contain sensitive information that should not be visible to anyone with read access. By preventing access to unpublished articles, reviewers are given the opportunity to verify the content before it is made accessible. This ensures that only properly reviewed and approved information is available to users with read access.</description>
6+
<documentation_url>https://docs.servicenow.com/bundle/vancouver-servicenow-platform/page/product/knowledge-management/reference/r_KnowledgeProperties.html</documentation_url>
7+
<finding_type>scan_finding</finding_type>
8+
<name>Don't show unpublished knowledge articles</name>
9+
<priority>2</priority>
10+
<resolution_details>Set the glide.knowman.show_unpublished property to false.</resolution_details>
11+
<run_condition/>
12+
<score_max>100</score_max>
13+
<score_min>0</score_min>
14+
<score_scale>1</score_scale>
15+
<script><![CDATA[(function(finding) {
16+
var targetProperty = 'glide.knowman.show_unpublished';
17+
var expectedValue = 'false';
18+
var defaultValue = 'true';
19+
20+
var propertyValue = gs.getProperty(targetProperty, defaultValue);
21+
22+
if (propertyValue.toLowerCase() != expectedValue.toLowerCase()) {
23+
var gr = new GlideRecord('sys_properties');
24+
gr.get('name', targetProperty);
25+
finding.setCurrentSource(gr);
26+
finding.increment();
27+
}
28+
})(finding);]]></script>
29+
<short_description>Don't show unpublished knowledge articles</short_description>
30+
<sys_class_name>scan_script_only_check</sys_class_name>
31+
<sys_created_by>daniel.aagren.seehartrai.madsen</sys_created_by>
32+
<sys_created_on>2024-10-03 18:56:04</sys_created_on>
33+
<sys_id>46f6b819834592106137b6cfeeaad352</sys_id>
34+
<sys_mod_count>0</sys_mod_count>
35+
<sys_name>Don't show unpublished knowledge articles</sys_name>
36+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
37+
<sys_policy/>
38+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
39+
<sys_update_name>scan_script_only_check_46f6b819834592106137b6cfeeaad352</sys_update_name>
40+
<sys_updated_by>daniel.aagren.seehartrai.madsen</sys_updated_by>
41+
<sys_updated_on>2024-10-03 18:56:04</sys_updated_on>
42+
</scan_script_only_check>
43+
<sys_translated_text action="delete_multiple" query="documentkey=46f6b819834592106137b6cfeeaad352"/>
44+
<sys_es_latest_script action="INSERT_OR_UPDATE">
45+
<id>46f6b819834592106137b6cfeeaad352</id>
46+
<sys_created_by>daniel.aagren.seehartrai.madsen</sys_created_by>
47+
<sys_created_on>2024-10-03 18:56:04</sys_created_on>
48+
<sys_id>6d677855834592106137b6cfeeaad3d3</sys_id>
49+
<sys_mod_count>0</sys_mod_count>
50+
<sys_updated_by>daniel.aagren.seehartrai.madsen</sys_updated_by>
51+
<sys_updated_on>2024-10-03 18:56:04</sys_updated_on>
52+
<table>scan_script_only_check</table>
53+
<use_es_latest>true</use_es_latest>
54+
</sys_es_latest_script>
55+
</record_update>

0 commit comments

Comments
 (0)