Interview Prep/Git & GitHub/Secrets, Signing and Security

A release bot pushes commits, and branch rules require signed commits. How do you handle it?

IntermediateScenarioSecrets, Signing and Security
Answer

Situation read → Bots have no personal key, so their commits show as unverified.

What I'd do →

  1. Use the GitHub API (commits through a GitHub App token or GITHUB_TOKEN) so GitHub signs them with its own key and marks them Verified.
  2. Or give the bot a dedicated signing key stored as a secret, uploaded to the bot account.
  3. For file edits, use the contents API or GraphQL createCommitOnBranch, which produces verified commits.

Why → Commits created through the API by an app are signed by GitHub on its behalf.

Interview tip → Plain git push from a runner cannot produce verified commits without a key.

All Git & GitHub questions Roadmap: Git & GitHub

More on Secrets, Signing and Security