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

Encrypt env variables being passed to github workflow #601

Closed
oindrillac opened this issue Oct 18, 2022 · 3 comments
Closed

Encrypt env variables being passed to github workflow #601

oindrillac opened this issue Oct 18, 2022 · 3 comments

Comments

@oindrillac
Copy link
Member

Pass encrypted environment variables to github action token from running shell script.

@oindrillac
Copy link
Member Author

For the authorization token explore if passing it as such https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow treats the token as an encrypted string

@oindrillac
Copy link
Member Author

By using secret.GITHUB_TOKEN in the action workflow, I was able to use the token passed for triggering the workflow in the job. This means the user does not need to manually set the personal access token as a repository secret to trigger the workflow, but still have an option to do so.

The other public S3 bucket variables which are passed as the client payload, isnt encrypted when passed to the workflow. It seems unlikely that variables passed in that manner would be encrypted, so the recommended course currently is to only pass public bucket credentials in that manner through the client payload, and when using a private bucket, set them up as repository secrets.

@oindrillac
Copy link
Member Author

Found no obvious solution to encrypt environment variables passed via the client payload. Hence, added documentation to encourage passing only public S3 credentials via the curl, and to set private bucket as action secrets. Personal Access token is being passed encrypted. Closing this.

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

No branches or pull requests

2 participants