Skip to content

Use GitHub app auth#10812

Open
morganchen12 wants to merge 7 commits into
mainfrom
mc/release-app
Open

Use GitHub app auth#10812
morganchen12 wants to merge 7 commits into
mainfrom
mc/release-app

Conversation

@morganchen12

Copy link
Copy Markdown
Contributor

TODOs to complete this setup:

  • Add secrets to Secret Manager
  • Set up service account that can read secrets from Secret Manager
  • Maybe auth the git clone using the IAT so if it fails, it fails early instead of creating the commit and failing to push

Tested this on my personal project (just fetching the token) and it succeeded.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the scripts/publish/cloudbuild.yaml workflow to dynamically request a GitHub App Installation Access Token (IAT) using a JWT signed with the App's private key, replacing the previous static credentials setup. The review feedback highlights several critical security and reliability improvements: removing a log statement that exposes the generated JWT, securely cleaning up the temporary private key file using a shell trap, correcting the GitHub API version header, utilizing Node.js instead of a fragile sed regex to parse the token response, and ensuring the token is written to /workspace/hub so subsequent build steps can access it.

Comment thread scripts/publish/cloudbuild.yaml Outdated
Comment thread scripts/publish/cloudbuild.yaml
Comment thread scripts/publish/cloudbuild.yaml
Comment thread scripts/publish/cloudbuild.yaml
Comment thread scripts/publish/cloudbuild.yaml Outdated
@morganchen12
morganchen12 requested a review from joehan July 21, 2026 22:45
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

Successfully merging this pull request may close these issues.

3 participants