-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove references to __defsec_metadata
Signed-off-by: Nikita Pivkin <[email protected]>
- Loading branch information
Showing
13 changed files
with
30 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,29 +6,20 @@ import data.builtin.google.storage.google0001 as check | |
import data.lib.test | ||
|
||
test_allow_bucket_does_not_allow_public_access if { | ||
inp := build_input({ | ||
"__defsec_metadata": {"managed": true}, | ||
"bindings": [{"members": [{"value": "user:[email protected]"}]}], | ||
}) | ||
inp := build_input({"bindings": [{"members": [{"value": "user:[email protected]"}]}]}) | ||
res := check.deny with input as inp | ||
res == set() | ||
} | ||
|
||
test_deny_bucket_allows_public_access_members if { | ||
inp := build_input({ | ||
"__defsec_metadata": {"managed": true}, | ||
"bindings": [{"members": [{"value": "allAuthenticatedUsers"}]}], | ||
}) | ||
inp := build_input({"bindings": [{"members": [{"value": "allAuthenticatedUsers"}]}]}) | ||
|
||
res := check.deny with input as inp | ||
count(res) == 1 | ||
} | ||
|
||
test_deny_bucket_allows_public_access_bindings if { | ||
inp := build_input({ | ||
"__defsec_metadata": {"managed": true}, | ||
"bindings": [{"members": [{"value": "allAuthenticatedUsers"}]}], | ||
}) | ||
inp := build_input({"bindings": [{"members": [{"value": "allAuthenticatedUsers"}]}]}) | ||
|
||
res := check.deny with input as inp | ||
count(res) == 1 | ||
|