Skip to content

Commit

Permalink
test: add functional tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Pivkin <[email protected]>
  • Loading branch information
nikpivkin committed Aug 21, 2024
1 parent 1249750 commit e6e5dd8
Show file tree
Hide file tree
Showing 4 changed files with 697 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ import rego.v1

deny contains res if {
some provider in input.google.iam.workloadidentitypoolproviders
provider.attributecondition.value == ""
res := result.new("This workload identity pool provider configuration has no conditions set.", provider.attributecondition)
not has_conditions(provider)
res := result.new(
"This workload identity pool provider configuration has no conditions set.",
object.get(provider, "attributecondition", provider),
)
}

has_conditions(provider) := provider.attributecondition.value != ""
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# id: AVD-GCP-0005
# avd_id: AVD-GCP-0005
# provider: google
# service: IAM
# service: iam
# severity: MEDIUM
# short_code: no-folder-level-service-account-impersonation
# recommended_action: Provide access at the service-level instead of folder-level, if required
# input:
# selector:
# - type: cloud
# subtypes:
# - service: IAM
# - service: iam
# provider: google
# terraform:
# links:
Expand Down
Loading

0 comments on commit e6e5dd8

Please sign in to comment.