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(aws): disallow child-accounts to overwrite policy for ai_services_opt_out #6229

Conversation

kagahd
Copy link
Contributor

@kagahd kagahd commented Dec 17, 2024

Context

The check organizations_opt_out_ai_services_policy just verifies that AWS Organizations opt-out of AI services policy is enabled. However, it does not check if child-accounts are disallowed to overwrite this policy.
Since the check is only checking the AWS Organizations account and not the child accounts, it's important to check that child-accounts are disallowed to overwrite the opt-out policy.

Description

This PR extends the check organizations_opt_out_ai_services_policy to ensure that AWS Organizations opt-out of AI services policy is enabled and that child-accounts are disallowed to overwrite this policy.

Checklist

License

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

@kagahd kagahd requested review from a team as code owners December 17, 2024 17:21
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.08%. Comparing base (ec9455f) to head (1a47e14).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6229      +/-   ##
==========================================
- Coverage   90.09%   90.08%   -0.02%     
==========================================
  Files        1181     1182       +1     
  Lines       36275    36315      +40     
==========================================
+ Hits        32682    32713      +31     
- Misses       3593     3602       +9     
Flag Coverage Δ
prowler 90.08% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 90.08% <100.00%> (-0.02%) ⬇️
api ∅ <ø> (∅)

@MrCloudSec MrCloudSec changed the title disallow child-accounts to overwrite policy for "ai_services_opt_out" fix(aws): disallow child-accounts to overwrite policy for "ai_services_opt_out" Dec 18, 2024
@MrCloudSec MrCloudSec changed the title fix(aws): disallow child-accounts to overwrite policy for "ai_services_opt_out" fix(aws): disallow child-accounts to overwrite policy for ai_services_opt_out Dec 18, 2024
Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @kagahd, thank you!
Please, review my comments.

@MrCloudSec MrCloudSec self-requested a review December 20, 2024 14:17
@MrCloudSec MrCloudSec added backport-to-v4.6 Backport PR to the v4.6 branch backport-to-v5.0 Backport PR to the v5.0 branch labels Dec 20, 2024
Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix @kagahd !

@MrCloudSec MrCloudSec merged commit 231829d into prowler-cloud:master Dec 20, 2024
11 checks passed
@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Dec 20, 2024
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v4.6
v5.0

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v4.6 Backport PR to the v4.6 branch backport-to-v5.0 Backport PR to the v5.0 branch provider/aws Issues/PRs related with the AWS provider was-backported The PR was successfully backported to the target branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants