-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing the bug for google_kms_crypto_key policies (#848)
* Fixing the bug for google_kms_crypto_key policies: - checkRotation90Days - checkRotation365Days * Indentation changes
- Loading branch information
1 parent
cbbde51
commit 0eae483
Showing
2 changed files
with
7 additions
and
8 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
pkg/policies/opa/rego/gcp/google_kms_crypto_key/checkRotation365Days.rego
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package accurics | ||
|
||
checkRotation365Days[kms.id] { | ||
kms := input.google_kms_crypto_key[_] | ||
kms.config.rotation_period <= "31536000s" | ||
} | ||
checkRotation365Days[crypto_key.id]{ | ||
crypto_key := input.google_kms_crypto_key[_] | ||
to_number(trim(crypto_key.config.rotation_period, "s")) > 31536000 | ||
} |
7 changes: 3 additions & 4 deletions
7
pkg/policies/opa/rego/gcp/google_kms_crypto_key/checkRotation90Days.rego
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package accurics | ||
|
||
checkRotation90Days[api.id] | ||
{ | ||
api := input.google_kms_crypto_key[_] | ||
api.config.rotation_period <= "7776000s" | ||
checkRotation90Days[crypto_key.id]{ | ||
crypto_key := input.google_kms_crypto_key[_] | ||
to_number(trim(crypto_key.config.rotation_period, "s")) > 7776000 | ||
} |