Skip to content

feat: Update IAM policy document to limit ECR permissions (DBTP-3170) - #1546

Draft
BenFielder wants to merge 3 commits into
mainfrom
rewrite-ecr-permissions
Draft

feat: Update IAM policy document to limit ECR permissions (DBTP-3170)#1546
BenFielder wants to merge 3 commits into
mainfrom
rewrite-ecr-permissions

Conversation

@BenFielder

Copy link
Copy Markdown
Contributor

Addresses https://uktrade.atlassian.net/browse/DBTP-3170.

Updating the IAM policy for ECR repositories to tighten the permissions to further restrict who can push and pull from them.


Checklist:

Title:

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • If the work includes user interface changes, before and after screenshots included in description
  • Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

Reviewer Checklist

  • I have reviewed the PR and ensured no secret values are present

@BenFielder
BenFielder requested a review from a team as a code owner July 7, 2026 13:17
@datadog-uktrade

datadog-uktrade Bot commented Jul 7, 2026

Copy link
Copy Markdown

Code Quality  Code Vulnerabilities  IaC  Library Vulnerabilities  Secrets

🎉 All green!

🛠️ No new code quality issues
🛡️ No new code vulnerabilities
📚 No new vulnerable libraries detected
🧱 No new Infrastructure as Code (IaC) issues
🔑 No new secrets detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2031ea4 | Docs | Give us feedback!

@BenFielder
BenFielder marked this pull request as draft July 7, 2026 13:17
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Your PR has commits that are missing the Signed-off-by trailer. This is likely due to the pre-commit hook not being configured on your local machine. The usual fix for this issue is to run pre-commit install --install-hooks --overwrite -t commit-msg -t pre-commit, however for more detailed help in setting up the pre-commit hooks, follow the instructions at https://github.com/uktrade/github-standards/blob/main/README.md#usage

test = "StringLike"
variable = "aws:PrincipalArn"
values = [
"arn:aws:iam::${id}:role/aws-reserved/sso.amazonaws.com/eu-west-2/AWSReservedSSO_AdministratorAccess_*",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I assume we are fine allowing admins to have access under some circumstances where for some reason they may need to manually upload an image? Unlikely, but probably worth keeping the access there.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, should be okay

resources = "*"
}

statement {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this statement get ignored, since another action adds the same permissions below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants