-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(fixer): add Prowler Fixer feature! #3634
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ca6506e
feat(fixer): add fixer flag
sergargar 9d47288
solve comments
sergargar 85078ee
Merge branch 'prowler-4.0-dev' into prowler-fixer
sergargar 5e18a82
add changes to other PR
sergargar 059ba69
solve comments
sergargar eafc33f
Merge branch 'prowler-4.0-dev' into prowler-fixer
sergargar aeae83b
solve comments
sergargar cdd1a9b
exit when fixing
sergargar 6fdec63
execute fix after scan
sergargar 387ba70
solve comments
sergargar 8c75b1a
clean code
sergargar a7a4ce9
solve comments
sergargar 37f5874
do not create outputs in fix and put verbose
sergargar 170e301
add last changes
sergargar d5518a9
fix other providers
sergargar 2b6ec76
remove getattr
sergargar 31e6108
Merge branch 'prowler-4.0-dev' into prowler-fixer
sergargar 99fb615
final version
sergargar e59245a
fixes
sergargar 87949b6
fix test
sergargar 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 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 |
---|---|---|
|
@@ -544,3 +544,19 @@ def test__describe_volumes__(self): | |
assert ec2.volumes[0].tags == [ | ||
{"Key": "test", "Value": "test"}, | ||
] | ||
|
||
# Test EC2 EBS Enabling Encryption by Default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lovely! |
||
@mock_aws | ||
def test__describe_ebs_encryption_by_default__(self): | ||
# Generate EC2 Client | ||
ec2_client = client("ec2", region_name=AWS_REGION_US_EAST_1) | ||
|
||
# EC2 client for this test class | ||
aws_provider = set_mocked_aws_provider( | ||
[AWS_REGION_EU_WEST_1, AWS_REGION_US_EAST_1] | ||
) | ||
ec2 = EC2(aws_provider) | ||
|
||
assert not ec2.__enable_ebs_encryption_by_default__() | ||
ec2_client.enable_ebs_encryption_by_default() | ||
assert ec2.__enable_ebs_encryption_by_default__() |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need the check name here, you can use
check.CheckID
.