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

Feature/1584 aws ebs encryption #1614

Merged

Conversation

rdegraaf
Copy link

@rdegraaf rdegraaf commented Mar 5, 2024

Description

Adds support for AWS EC2 regional EBS encryption defaults and a rule to verify that encryption by default is enabled. The rule is added to the "default" and "detailed" rulesets.

This change requires the following new permissions when gathering data:

  • ec2:GetEbsDefaultKmsKeyId
  • ec2:GetEbsEncryptionByDefault

I added unit test support for the rule. There does not appear to be existing support for testing individual resources or facades; that's a problem for another change. The following unit tests failed -- but they also fail in the upstream "develop" branch:

FAILED tests/test_rules_ruleset.py::TestScoutRulesRuleset::test_path_for_cloud_providers - AssertionError: assert False
FAILED tests/test_rules_ruleset.py::TestScoutRulesRuleset::test_path_for_ruletypes - AssertionError: assert False

Fixes #1584

Type of change

Select the relevant option(s):

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (optional)
  • New and existing unit tests pass locally with my changes

It seems to work but there are issues with the display; see "TKTK"
comments in .../services.ec2.regions.id.regional_settings.html.

Still needs tests.
Apparently ScoutSuite makes the implicit assumption that all settings
are associated with resources, rather than directly to the region +
service. So we move the regional EBS settings into a fake resource.
This means that paths now need to include an ID for the "resource".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants