This repository was archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
added policy to check in_transit encryption enable or not for elastic… #1083
Open
SanaaYousaf
wants to merge
5
commits into
aquasecurity:master
Choose a base branch
from
SanaaYousaf:enable_in_transit_encryption_elasticache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
acbfeb8
added policy to check in_transit encryption enable or not for elastic…
SanaaYousaf b342800
Update avd_docs/kubernetes/general/AVD-KSV-0109/docs.md
SanaaYousaf 5496be7
Update avd_docs/kubernetes/general/AVD-KSV-0108/docs.md
SanaaYousaf 3c5bf15
Update avd_docs/kubernetes/general/AVD-KSV-0108/docs.md
SanaaYousaf a7efd63
Update avd_docs/kubernetes/general/AVD-KSV-01010/docs.md
SanaaYousaf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
|
||
Ensure that your AWS ElastiCache Redis clusters have encryption in-transit enabled. | ||
|
||
### Impact | ||
<!-- Add Impact here --> | ||
|
||
<!-- DO NOT CHANGE --> | ||
{{ remediationActions }} | ||
|
||
### Links | ||
- https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html | ||
|
||
|
This file contains hidden or 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 hidden or 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
25 changes: 25 additions & 0 deletions
25
internal/rules/policies/cloud/policies/aws/elasticache/enable_in_transit_encryption.rego
This file contains hidden or 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,25 @@ | ||
# METADATA | ||
# title: "ElastiCache Redis Cluster Encryption In-Transit" | ||
# description: "Ensure that your AWS ElastiCache Redis clusters have encryption in-transit enabled." | ||
# scope: package | ||
# schemas: | ||
# - input: schema.input | ||
# related_resources: | ||
# - https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html | ||
# custom: | ||
# avd_id: AVD-AWS-0198 | ||
# provider: aws | ||
# service: elasticache | ||
# severity: HIGH | ||
# short_code: enable-in-transit-encryption | ||
# recommended_action: "Enable in-transit encryption for ElastiCache clusters" | ||
# input: | ||
# selector: | ||
# - type: cloud | ||
package builtin.aws.elasticache.aws0198 | ||
|
||
deny[res] { | ||
group := input.aws.elasticache.replicationgroups[_] | ||
not group.transitencryptionenabled.value | ||
res := result.new("Replication group does not have transit encryption enabled.", group.transitencryptionenabled) | ||
} |
11 changes: 11 additions & 0 deletions
11
...rnal/rules/policies/cloud/policies/aws/elasticache/enable_in_transit_encryption_test.rego
This file contains hidden or 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,11 @@ | ||
package builtin.aws.elasticache.aws0198 | ||
|
||
test_detects_when_disabled { | ||
r := deny with input as {"aws": {"elasticache": {"replicationgroups": [{"transitencryptionenabled": {"value": false}}]}}} | ||
count(r) == 1 | ||
} | ||
|
||
test_when_enabled { | ||
r := deny with input as {"aws": {"elasticache": {"replicationgroups": [{"transitencryptionenabled": {"value": true}}]}}} | ||
count(r) == 0 | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.