How to get an app token in GitHub Actions without a secret key: GATES, built by a developer with AWS(zenn.dev)
Writing language: KoreanRead in the original language
Plain summary
- A tool that lets an automated job borrow repository permissions without handing the job the key (secret key) used for that purpose, and instead lets it use only a temporary pass. It is GATES, made for GitHub Actions by developer tmknom, and it uses AWS Lambda and AWS KMS.
- The conventional approach shares a long-lived secret key across multiple repositories. The original article points out that anyone who can edit a workflow can easily extract the key externally, which increases the paths for leaks.
- It proves the workflow's identity with GitHub OIDC to obtain temporary AWS credentials, and KMS handles the signing needed to issue the token. According to the original article, even administrators cannot extract a key placed in KMS, and Lambda cannot see it in plaintext.
- The scope is deliberately narrow. It is only for GitHub Actions and AWS, and handles one GitHub App per Lambda and only repository permissions. The author stated that if the signing permission (kms:Sign) were stolen, signing would be possible, so that permission is not given to workflows.
Found on
Zenn ↗ / Published by source
Have you run into something like this? Tell us in a line or two what you did. You do not need to know the product.