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_ACCESS_TOKEN should not be an environmental variable? #33

Open
cboettig opened this issue Sep 19, 2020 · 2 comments
Open

GITHUB_ACCESS_TOKEN should not be an environmental variable? #33

cboettig opened this issue Sep 19, 2020 · 2 comments

Comments

@cboettig
Copy link

A pull request could add the command echo $GITHUB_ACCESS_TOKEN and expose the token. Even if you are only using in private repositories, I don't think it is desirable to so directly expose a private token to collaborators.

Perhaps there's a way to still make the token available to entrypoint.sh without making it visible as an env var on the runner?

@ghost
Copy link

ghost commented Apr 15, 2021

I second this. I had to rotate my token today because of Codecov.io's recent security incident which potentially exposed this token.
Would it be sensible to bind a .env file containing the token into the container to get the token from there?

@cboettig
Copy link
Author

My current approach has been to comment out the execution of entrypoint.sh in the Dockerfile,

ENTRYPOINT ["/entrypoint.sh"]

and avoid providing the secure credentials in an environmental variable at run time. Once the container is up, I docker exec into it, run entrypoint.sh manually with the credentials. This way, these credentials are not stored as env var that could be accidentally exposed.

I'm not a security expert, and there may be other routes which are more streamlined and/or more secure than this, but at least I think it's better than embedding the private token so directly.

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

1 participant