Skip to content

Commit

Permalink
fix: limit permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
mms2409 committed Feb 16, 2024
1 parent 706d2e2 commit 707278f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions modules/services/workload-scanning/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ data "aws_iam_policy_document" "scanning" {
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
"ecr:GetRepositoryPolicy",
"ecr:DescribeRepositories",
"ecr:ListImages",
"ecr:DescribeImages",
"ecr:ListTagsForResource",
"ecr:GetAuthorizationToken",
]

Expand All @@ -49,7 +45,7 @@ resource "aws_iam_policy" "scanning" {
count = (var.deploy_global_resources || var.is_organizational) ? 1 : 0

name = var.name
description = "Grants Sysdig Secure access to volumes and snapshots"
description = "Grants Sysdig Secure access to ECR images"
policy = data.aws_iam_policy_document.scanning[0].json
tags = var.tags
}
Expand Down
4 changes: 0 additions & 4 deletions modules/services/workload-scanning/organizational.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ Resources:
- "ecr:GetDownloadUrlForLayer"
- "ecr:BatchGetImage"
- "ecr:BatchCheckLayerAvailability"
- "ecr:GetRepositoryPolicy"
- "ecr:DescribeRepositories"
- "ecr:ListImages"
- "ecr:DescribeImages"
- "ecr:ListTagsForResource"
- "ecr:GetAuthorizationToken"
Resource: "*"
Expand Down

0 comments on commit 707278f

Please sign in to comment.