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

Fixed potential self-escalation from iam:PassRole #215

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

comrumino
Copy link
Contributor

What I did

  • Moved iam:PassRole from AllowOperations to a new statement named AllowPassRole and limited the resources/roles that can be passed to aws_iam_role.ec2 and aws_iam_role.service

Why I did it

  • The current default policy document is overly permissive and was reported by our security tooling as a having the potential for privilege escalation. Without restricting which roles can be passed, a role with elevated privileges could be passed.
  • Splitting actions into smaller statements make overriding resources or specific statements less unwieldy.

@comrumino comrumino requested review from a team as code owners October 24, 2022 18:32
…llowOperations to a new statement named AllowPassRole that restricts resources to aws_iam_role.ec2 and aws_iam_role.service
@aknysh
Copy link
Member

aknysh commented Oct 24, 2022

/test all

@aknysh aknysh added the patch A minor, backward compatible change label Oct 24, 2022
@aknysh aknysh merged commit 87808f7 into cloudposse:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants