Skip to content
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

fix(ebs): improve snapshot encryption logic and typos #2836

Merged

Conversation

taylerhaviland
Copy link
Contributor

Context

Currently the EC2 EBS snapshot encryption check results in false negatives.

Additionally, I have fixed two typos. One includes more accurately describing the function __get_snapshot_public__

Description

This PR fixes the logic to accurately FAIL unencrypted EBS snapshots. It also more accurately describes the __get_snapshot_public__ logging statement.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@taylerhaviland taylerhaviland requested a review from a team as a code owner September 13, 2023 01:36
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #2836 (fefa4f9) into master (f1bea27) will decrease coverage by 0.01%.
Report is 4 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2836      +/-   ##
==========================================
- Coverage   86.25%   86.24%   -0.01%     
==========================================
  Files         539      539              
  Lines       17312    17301      -11     
==========================================
- Hits        14933    14922      -11     
  Misses       2379     2379              
Files Changed Coverage Δ
prowler/providers/aws/services/ec2/ec2_service.py 94.02% <100.00%> (-0.07%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sergargar sergargar changed the title Fixed ebs snapshot encryption logic and typos fix(ebs): improve snapshot encryption logic and typos Sep 13, 2023
@sergargar
Copy link
Member

@taylerhaviland I have made a change in the code because we need to check if the key Encrypted exists. Let me know if it still works on your side.

@taylerhaviland
Copy link
Contributor Author

Hi @sergargar, your change gives me the expected results.

LGTM

@sergargar sergargar self-requested a review September 15, 2023 08:37
@sergargar sergargar merged commit e745885 into prowler-cloud:master Sep 15, 2023
7 of 8 checks passed
@jfagoagas jfagoagas added the provider/aws Issues/PRs related with the AWS provider label Sep 15, 2023
jit-contrib pushed a commit to jit-contrib/prowler that referenced this pull request Sep 28, 2023
…2836)

Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants