-
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.
- Loading branch information
Cesar Rodriguez
committed
Oct 7, 2020
1 parent
ed26230
commit 7ed87c5
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...rego/aws/aws_lambda_function/AWS.LambdaFunction.EncryptionandKeyManagement.High.0471.json
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "lambdaNotEncryptedWithKms", | ||
"file": "lambdaNotEncryptedWithKms.rego", | ||
"template_args": { | ||
"prefix": "" | ||
}, | ||
"severity": "High", | ||
"description": "Lambda does not have KMS key to protect environment variables.", | ||
"reference_id": "AWS.LambdaFunction.EncryptionandKeyManagement.High.0471", | ||
"category": "Encryption and Key Management", | ||
"version": 2 | ||
} |
13 changes: 13 additions & 0 deletions
13
pkg/policies/opa/rego/aws/aws_lambda_function/lambdaNotEncryptedWithKms.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package accurics | ||
|
||
#{{.prefix}}lambdaNotEncryptedWithKms[retVal] { | ||
#lambda := input.aws_lambda_function[_] | ||
#lambda.config.kms_key_arn == null | ||
#traverse = "" | ||
# retVal := { "Id": lambda.id, "ReplaceType": "edit", "CodeType": "attribute", "Traverse": traverse, "Attribute": "kms_key_arn", "AttributeDataType": "string", "Expected": "<kms_key_arn>", "Actual": null } | ||
#} | ||
|
||
lambdaNotEncryptedWithKms[lambda.id] { | ||
lambda := input.aws_lambda_function[_] | ||
not lambda.config.kms_key_arn | ||
} |