Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github secrets become public env variables in AWS console #45

Open
ccastaneda-gap opened this issue Jul 7, 2023 · 4 comments
Open

Github secrets become public env variables in AWS console #45

ccastaneda-gap opened this issue Jul 7, 2023 · 4 comments

Comments

@ccastaneda-gap
Copy link

Github secret values are exposed as environment variables in AWS App Runner console, everyone can access them. Am I missing something?

@hariohmprasath
Copy link
Contributor

Hi @ccastaneda-gap,
Can you provide a bit more context around this? Can you post your github workflow definition file so we can understand whats the issue here?

@ghost
Copy link

ghost commented Nov 6, 2023

We do have the same issue.

At the beginning we define the env variables with Github Secrets, e.g.

env:
  AWS_REGION: eu-central-1
  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}

They get passed into AppRunner

      - name: Deploy to App Runner Image
        uses: awslabs/amazon-app-runner-deploy@main
(...)
        with:
          copy-env-vars: |
              AWS_REGION
              AWS_ACCESS_KEY_ID

In AWS Console of AppRunner they get shown in plain text. Is there an option to pass in environment variables from SecretsManager or SSM Parameter Store instead?

@DmitryGulin
Copy link
Contributor

You can use copy-secret-env-vars configuration parameter to pass a set of existing Secrets Manager or SSM Parameter Store ARNs. This configuration parameter value is mapped to the RuntimeEnvironmentSecrets API parameter when creating a new AppRunner service.
You can read more about RuntimeEnvironmentSecrets parameter behavior for Image and Code source configuration.

        env:
          SECRET_ENV: ${{ secrets.AWS_SECRET_ARN }}
        with:
          copy-secret-env-vars: |
            SECRET_ENV            

@ItamarSmirra
Copy link

Hi!
I want to pass to my AppRunner service secret env variable called AWS_ACCESS_KEY_ID (and secret access key and reagion too...) for the service to be able to integrate with my S3 bucket.
My problem is that in my workflow, define does env variables overrides the aws credentials my job needs to be able to deploy the service to the AppRunner. It doesn't has permissions to do so since my S3 credentials points to different IAM account that has no permissions to the S3.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants