PLT-1130:Create Roles and Policies for each API #253
Merged
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.
🎫 Ticket
https://jira.cms.gov/browse/PLT-1130
🛠 Changes
The policy was updated to separate global actions required by Snyk (ecr:GetAuthorizationToken, ecr:DescribeRepositories) from scoped repository actions, which are now restricted to only teams e.g bcda-, dpc-, ab2d-* ECR repositories.
ℹ️ Context
This change ensures each team (e.g., BCDA, AB2D, DPC) can only scan their own ECR repositories in Snyk by restricting repository-level permissions in IAM policies. While Snyk requires global access to list all repositories (ecr:DescribeRepositories), teams can only add and scan images from their respective repos.
🧪 Validation
See checks.
link to successful tf plan https://github.com/CMSgov/ab2d-bcda-dpc-platform/actions/runs/15692016486/job/44209308692?pr=253.
please note plan fails for legacy account because snyk external id's was not updated in param store for legacy account
role ARN snyk integration tested see comments and screenshot of snyk integration behavior for this role and policy on Jira ticket