CCSS (Common Configuration Scoring System) is a set of measures used to determine the severity of the rule.
Each rule is associated with a high-level category. For example IAM, Container, Monitoring, Logging, Network, etc.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsThe ECR policy allows access to any account.
Set statement.principal
attribute of policy document to specific accounts only e.g. arn:aws:iam::account-id:root
.
resource "aws_ecr_repository" "foo" {
name = "bar"
}
resource "aws_ecr_repository_policy" "allowed" {
repository = aws_ecr_repository.foo.name
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "new policy",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:root"
},
"Action": [
"ecr:ListImages"
]
}
]
}
EOF
}
Set Statement.Principal
attribute of policy document to specific accounts only e.g. arn:aws:iam::account-id:root
.
Type: AWS::ECR::Repository
Properties:
RepositoryPolicyText: {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "new policy",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<account-id>:root"
},
"Action": [
"ecr:DeleteRepositoryPolicy"
]
}
]
}
# other required properties