Skip to content

Commit

Permalink
[#328] Default Safe variable is incorrect in many cases (#343)
Browse files Browse the repository at this point in the history
* defaultSafe ticket #328

* [#328] Fix 14.1

* [#328] Update Meet 4.1

* [#328] Fixed unit tests for Calendar

* [#328] Unit tests for Chat fixed

* [#328] Classroom unit tests fixed

* [#328] CommonCnotrols unit tests fixed

* [#328] Drive unit tests fixed

* [#328] Gmail unit tests updated

* [#328] Last unit test in Gmail fixed

* [#328] Groups unit tests fixed

* [#328] Meet unit tests updated

* [#328] Meet last unit test fixed

* [#328] PR updates

* [#328] Removed extra white space

---------

Co-authored-by: Annie ORourke <[email protected]>
  • Loading branch information
snarve and aormu authored Aug 21, 2024
1 parent 9eec6e8 commit 2e00bf2
Show file tree
Hide file tree
Showing 36 changed files with 156 additions and 159 deletions.
8 changes: 4 additions & 4 deletions Testing/RegoTests/calendar/calendar01_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ test_ExtSharingPrimaryCal_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down Expand Up @@ -387,12 +387,12 @@ test_ExtSharingPrimaryCal_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
8 changes: 4 additions & 4 deletions Testing/RegoTests/calendar/calendar02_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ test_ExtInvitationsWarning_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down Expand Up @@ -295,12 +295,12 @@ test_ExtInvitationsWarning_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
4 changes: 2 additions & 2 deletions Testing/RegoTests/calendar/calendar03_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ test_CalInteropMan_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
4 changes: 2 additions & 2 deletions Testing/RegoTests/calendar/calendar04_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ test_CalendarAppointmentSlot_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
8 changes: 4 additions & 4 deletions Testing/RegoTests/chat/chat01_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ test_History_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down Expand Up @@ -328,12 +328,12 @@ test_History_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}
#--
Expand Down
8 changes: 4 additions & 4 deletions Testing/RegoTests/chat/chat03_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ test_Space_History_Setting_Incorrect_V1 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down Expand Up @@ -327,12 +327,12 @@ test_Space_History_Setting_Incorrect_V6 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
8 changes: 4 additions & 4 deletions Testing/RegoTests/classroom/classroom01_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ test_JoinClassroom_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}
#--
Expand Down Expand Up @@ -359,11 +359,11 @@ test_WhichClasses_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}
12 changes: 6 additions & 6 deletions Testing/RegoTests/classroom/classroom04_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ test_UnenrollStudents_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
RuleOutput[0].RequirementMet
not RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is compliant; manual check recommended."
"is non-compliant; manual check recommended."
])
}
test_UnenrollStudents_Incorrect_V4 if {
Expand Down Expand Up @@ -335,12 +335,12 @@ test_UnenrollStudents_Incorrect_V5 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
RuleOutput[0].RequirementMet
not RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is compliant; manual check recommended."
"is non-compliant; manual check recommended."
])
}

Expand Down Expand Up @@ -481,12 +481,12 @@ test_UnenrollStudents_Incorrect_V9 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
RuleOutput[0].RequirementMet
not RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, Test Top-Level OU. ",
"While we are unable to determine the state from the logs, the default setting ",
"is compliant; manual check recommended."
"is non-compliant; manual check recommended."
])
}
#--
24 changes: 12 additions & 12 deletions Testing/RegoTests/commoncontrols/commoncontrols05_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ test_Strength_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Strength_Incorrect_V4 if {
Expand All @@ -249,13 +249,13 @@ test_Strength_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Strength_Incorrect_V5 if {
Expand Down Expand Up @@ -1025,13 +1025,13 @@ test_Reuse_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Reuse_Incorrect_V4 if {
Expand All @@ -1058,13 +1058,13 @@ test_Reuse_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Reuse_Incorrect_V5 if {
Expand Down Expand Up @@ -1276,13 +1276,13 @@ test_Expire_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Expire_Incorrect_V4 if {
Expand All @@ -1309,13 +1309,13 @@ test_Expire_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Expire_Incorrect_V5 if {
Expand Down
8 changes: 4 additions & 4 deletions Testing/RegoTests/commoncontrols/commoncontrols11_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,13 @@ test_Access_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Access_Incorrect_V4 if {
Expand All @@ -694,13 +694,13 @@ test_Access_Incorrect_V4 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])}

test_Access_Incorrect_V5 if {
Expand Down
4 changes: 2 additions & 2 deletions Testing/RegoTests/commoncontrols/commoncontrols15_test.rego
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ test_Logs_Incorrect_V3 if {

RuleOutput := [Result | some Result in Output; Result.PolicyId == PolicyId]
count(RuleOutput) == 1
not RuleOutput[0].RequirementMet
RuleOutput[0].RequirementMet
RuleOutput[0].NoSuchEvent
RuleOutput[0].ReportDetails == concat("", [
"No relevant event in the current logs for the top-level OU, ",
"Test Top-Level OU. While we are unable ",
"to determine the state from the logs, the default setting ",
"is non-compliant; manual check recommended."
"is compliant; manual check recommended."
])
}

Expand Down
Loading

0 comments on commit 2e00bf2

Please sign in to comment.