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 →
- 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. - Or give the bot a dedicated signing key stored as a secret, uploaded to the bot account.
- 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.
More on Secrets, Signing and Security
A developer pushed an AWS access key to a public repo 10 minutes ago. What is your first move?BeginnerAfter rotating the leaked key, you must purge it from repository history. How?AdvancedA push is rejected: "GH013: Repository rule violations found ... Push cannot contain secrets". What do you do?IntermediateSecret scanning alerts have piled up, and many look like false positives or old test credentials.IntermediateYou must set up signed commits on your laptop. Which method do you pick?BeginnerYour GPG signing key expires next week. What is the correct way to handle it?Intermediate