Fix CRLY.01173: Constrain IAM Permissions Management #44
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.
Issue Details
ID: CRLY.01173
Severity: MEDIUM
File: pipeline/cfn-deploypipeline-s3.yaml
Remediation Summary
Description
The IAM policy associated with the
PipelineExecutionRole
allows permissions management without constraints, which can lead to security risks. Specifically, the policy allows actions such asiam:PassRole
,lambda:InvokeFunction
,lambda:ListFunctions
, andlambda:InvokeAsyc
with a resource of*
, which means any resource.Steps
Update the IAM Policy: Modify the IAM policy to restrict permissions management by specifying more precise resource constraints.
Use IAM Policy Conditions: Add conditions to the IAM policy to ensure that permissions are only granted under specific circumstances.
Here is an example of how to update the IAM policy in the YAML file:
Replace
REGION
,ACCOUNT_ID
, andFUNCTION_NAME
with the appropriate values for your use case.Replace
YOUR_STACK_NAME
andCAPABILITY_NAMED_IAM
with the appropriate values for your stack and capabilities.