Skip to content

Copilot role EnvManagerRole exposes secrets beyond copilot secrets #4624

Open
@krdchang

Description

Copilot creates a role ${AWS::StackName}-EnvManagerRole which contains a policy named 'root' that has the following snippet,

          - Sid: SSM
            Effect: Allow
            Action: [
              "ssm:DeleteParameter",
              "ssm:DeleteParameters",
              "ssm:GetParameter",
              "ssm:GetParameters",
              "ssm:GetParametersByPath"
            ]
            Resource: "*"

This grants ECS tasks access to all secrets (and not just the copilot-specific secrets). Also, if I'm to grant developers access to exec into a container I have granted them access to assume this role (and therefore exposing further, more secrets to my users).
The template should specify only resources applicable to copilot application and environment.

This issue applies to the current CLI version 1.26.0 and below.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    area/permissionsIssues about IAM permissionstype/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions