Skip to content

Commit

Permalink
defaultSafe ticket #328
Browse files Browse the repository at this point in the history
  • Loading branch information
aormu committed Jul 31, 2024
1 parent 60f8fbf commit 887e10a
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions rego/Calendar.rego
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "SHARING_OUTSIDE_DOMAIN", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -174,7 +174,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "ENABLE_EXTERNAL_GUEST_PROMPT", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -212,7 +212,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsNoOU(LogEvents, "ENABLE_EWS_INTEROP")
count(Events) == 0
}
Expand Down Expand Up @@ -278,7 +278,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "CalendarAppointmentSlotAdminSettingsProto payments_enabled"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down
4 changes: 2 additions & 2 deletions rego/Chat.rego
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "ChatArchivingProto chatsDefaultToOffTheRecord", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -210,7 +210,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "RoomOtrSettingsProto otr_state", utils.TopLevelOU)
count(Events) == 0
}
Expand Down
6 changes: 3 additions & 3 deletions rego/Classroom.rego
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "ClassMembershipSettingProto who_can_join_classes", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -106,7 +106,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "ClassMembershipSettingProto which_classes_can_users_join"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -290,7 +290,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := true
DefaultSafe := false
SettingName := "StudentUnenrollmentSettingsProto who_can_unenroll_students"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down
14 changes: 7 additions & 7 deletions rego/Commoncontrols.rego
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "Password Management - Enforce strong password", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -785,7 +785,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "Password Management - Enable password reuse", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -832,7 +832,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "Password Management - Password reset frequency", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -1174,7 +1174,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := APIAccessEvents
count(Events) == 0
}
Expand Down Expand Up @@ -1489,7 +1489,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := FilterEventsOU("WEAK_PROGRAMMATIC_LOGIN_SETTINGS_CHANGED", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -1656,7 +1656,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := true
DefaultSafe := false
NoSuchEvent12_1 == true
}

Expand Down Expand Up @@ -1771,7 +1771,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "CHANGE_DATA_LOCALIZATION_FOR_RUSSIA", utils.TopLevelOU)
count(Events) == 0
}
Expand Down
10 changes: 5 additions & 5 deletions rego/Drive.rego
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "SHARING_OUTSIDE_DOMAIN", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -557,7 +557,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "DEFAULT_LINK_SHARING_FOR_NEW_DOCS", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -738,7 +738,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Shared Drive Creation new_team_drive_restricts_direct_access"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -800,7 +800,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents,
"Shared Drive Creation new_team_drive_restricts_download", utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -885,7 +885,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
NoSuchEvent3_1(utils.TopLevelOU)
}

Expand Down
32 changes: 16 additions & 16 deletions rego/Gmail.rego
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ tests contains {
"RequirementMet": DefaultSafe,
"NoSuchEvent": true
} if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Attachment safety Enable: protect against encrypted attachments from untrusted senders"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -358,7 +358,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Attachment safety Enable: protect against attachments with scripts from untrusted senders"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -475,7 +475,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Attachment safety Enable: automatically enables all future added settings"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -641,7 +641,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Links and external images safety Enable: identify links behind shortened URLs"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -698,7 +698,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Links and external images safety Enable: scan linked images"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -756,7 +756,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := concat("", [
"Links and external images safety Enable: show warning prompt for click on links to ",
"unstrusted domains" # NOTE: "unstrusted" really is the spelling the API uses
Expand Down Expand Up @@ -821,7 +821,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Links and external images safety Enable: automatically enables all future added settings"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -900,7 +900,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := concat("", [
"Spoofing and authentication safety Enable: protect against domain spoofing using ",
"similar domain names"
Expand Down Expand Up @@ -965,7 +965,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := concat("", ["Spoofing and authentication safety Enable: ",
"protect against spoofing of employee names"])
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
Expand Down Expand Up @@ -1039,7 +1039,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Spoofing and authentication safety Enable: protect against inbound emails spoofing your domain"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -1439,7 +1439,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "ENABLE_EMAIL_USER_IMPORT", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -1739,7 +1739,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEventsOU(LogEvents, "OUTBOUND_RELAY_ENABLED", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -1799,7 +1799,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "OutOfDomainWarningProto disable_untrusted_recipient_warning"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -1869,8 +1869,8 @@ tests contains {
"Criticality": "Should",
"ReportDetails": EmailAllowlistSettingDetailsStr(LastEvent),
"ActualValue": {LastEvent.Setting: LastEvent.NewValue},
"RequirementMet": Status,
"NoSuchEvent": false
"RequirementMet": true,
"NoSuchEvent": true
}
if {
Events := utils.FilterEventsNoOU(LogEvents, "EMAIL_SPAM_ALLOWLIST")
Expand Down Expand Up @@ -1921,7 +1921,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "DelayedDeliverySettingsProto disable_delayed_delivery_for_suspicious_email"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down
8 changes: 4 additions & 4 deletions rego/Groups.rego
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEvents(LogEvents, "GroupsSharingSettingsProto collaboration_policy", utils.TopLevelOU)
count(Events) == 0
}
Expand Down Expand Up @@ -81,7 +81,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "GroupsSharingSettingsProto owners_can_allow_external_members"
Events := utils.FilterEvents(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -130,7 +130,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "GroupsSharingSettingsProto owners_can_allow_incoming_mail_from_public"
Events := utils.FilterEvents(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -285,7 +285,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
Events := utils.FilterEvents(LogEvents, "GroupsSharingSettingsProto allow_unlisted_groups", utils.TopLevelOU)
count(Events) == 0
}
Expand Down
4 changes: 2 additions & 2 deletions rego/Meet.rego
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Warn for external participants External or unidentified participants in a meeting are given a label"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down Expand Up @@ -346,7 +346,7 @@ tests contains {
"NoSuchEvent": true
}
if {
DefaultSafe := false
DefaultSafe := true
SettingName := "Incoming call restrictions Allowed caller type"
Events := utils.FilterEventsOU(LogEvents, SettingName, utils.TopLevelOU)
count(Events) == 0
Expand Down

0 comments on commit 887e10a

Please sign in to comment.