From: Adrian Szyndela Date: Wed, 9 Jan 2019 15:46:32 +0000 (+0100) Subject: policychecker: add rules for send_destination_prefix X-Git-Tag: submit/tizen/20180808.030253~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47790c834576d4731df612f31a5aa14649d92096;p=platform%2Fcore%2Fsystem%2Fdbus-tools.git policychecker: add rules for send_destination_prefix Added rules for send_destination_prefix. Additionally, modified 'default denials' rule to take into account possible own_prefix values. This is limited by XPath/Schematron possibilities, and is currently set to 8 prefixes for each tested destination. Change-Id: I7a653b1f55339e67e63e9c97b0c6ba37ff2c9b73 --- diff --git a/policychecker/rules.xsl b/policychecker/rules.xsl index d05fd3b..d022d9c 100644 --- a/policychecker/rules.xsl +++ b/policychecker/rules.xsl @@ -10,11 +10,51 @@ - + + + + + + + + + + For each allow send_destination you must add a deny send_destination in default context. - For each allow send_destination you must add a deny own in default context. + For each allow send_destination you must add a deny own or deny own_prefix in default context. + + + + + For each allow send_destination_prefix you must add a deny send_destination_prefix in default context. + For each allow send_destination_prefix you must add a deny own_prefix in default context @@ -29,11 +69,11 @@ - Unconstrained allows are not allowed in context default and context mandatory: missing send_destination, but send_type="method_call" is present. + Unconstrained allows are not allowed in context default and context mandatory: missing send_destination or send_destination_prefix, but send_type="method_call" is present. Unconstrained allows are not allowed in context default and context mandatory: missing send_interface, but send_type="method_call" is present. - Unconstrained allows are not allowed in context default and context mandatory: missing send_destination, but send_path is present. + Unconstrained allows are not allowed in context default and context mandatory: missing send_destination or send_destination_prefix, but send_path is present. Unconstrained allows are not allowed in context default and context mandatory: missing receive_sender, but receive_type="method_call" is present. @@ -44,10 +84,10 @@ - Unconstrained allows are not allowed in user or group context: missing send_destination, but send_type="method_call" is present. + Unconstrained allows are not allowed in user or group context: missing send_destination or send_destination_prefix, but send_type="method_call" is present. - Unconstrained allows are not allowed in user or group context: missing send_destination, but send_path is present. + Unconstrained allows are not allowed in user or group context: missing send_destination or send_destination_prefix, but send_path is present. Unconstrained allows are not allowed in user or group context: missing receive_sender, but receive_type="method_call" is present. @@ -63,8 +103,8 @@ You must provide a policy context-default section. - You must define a 'deny own="yourname"' rule in context-default policy to avoid depending on a global 'deny own="*"'. - You must define a 'deny send_destination="yourname"' rule in context-default policy to avoid depending on a global deny. + You must define a 'deny own="yourname"' or 'deny own_prefix="yourname"' rule in context-default policy to avoid depending on a global 'deny own="*"'. + You must define a 'deny send_destination="yourname"' or 'deny send_destination_prefix="yourname"' rule in context-default policy to avoid depending on a global deny. @@ -137,7 +177,7 @@ - You mustn't use send_interface without send_destination, unless you limit the rule to only signals with send_type="signal" + You mustn't use send_interface without send_destination or send_destination_prefix, unless you limit the rule to only signals with send_type="signal" You mustn't use receive_interface without receive_sender @@ -146,7 +186,7 @@ - You mustn't use send_ and receive_ attributes in one rule. + You mustn't use send_ and receive_ attributes in one rule.