Repository navigation
Open
Labels
effort/highEffort High: much work, in one pull requestowner/agentOwner Agent: an agentic coder works on the itempriority/p2-mediumPriority P2: standard workscope/ghThe devops gh commandssource/agentFiled by an agentstatus/in-progressStatus In Progress: an owner works on the itemtype/featureType feature: a new functionvalue/mediumValue Medium
Description
Problem
Owner direction of 2026-11-22: a devops command makes and sets the release App credentials of a repository, so that each repository has its own key. One release App serves the whole account ("one release app per org"); a key is not used again in a second repository.
- dan-petty/infra and dan-petty/devtools release with release-please and a token of the release App
dan-petty-releasefrom the environmentrelease(RELEASE_APP_CLIENT_ID,RELEASE_APP_PRIVATE_KEY). Their environments have the variable and the rule that onlymaindeploys, but no key. - GitHub returns no secret value, and one key in many repositories means that a leak of one repository needs a new key in all of them.
- An App can have more than one private key. GitHub has no API that makes one: a person makes a key on the settings page of the App, and the browser downloads it as
<slug>.<date>.private-key.pem(GitHub docs, "Managing private keys for GitHub Apps"). GitHub shows the SHA-256 fingerprint of each key there.
Proposed remedy
A command that a person runs, for example devops gh app key --repo <owner>/<name> [--environment release] [--dry-run]. The App comes from the config (slug, App ID, client ID), not from a flag of each run.
- Opens the key page of the App and waits for a new
.pemfile of the App in the download folder (or takes--key-file). - Proves that the key belongs to the App: a JWT signed with the key gets
GET /app, and the slug is the App slug. It checks that the App is installed on the repository (GET /repos/<repo>/installation). - Makes the environment, if missing, with the rule that only the default branch deploys. It sets the variable
RELEASE_APP_CLIENT_ID, and seals the key with the public key of the environment (libsodium, asdevops gh secret syncseals) into the secretRELEASE_APP_PRIVATE_KEY. It sets the variableRELEASE_APP_KEY_FINGERPRINT(not secret), so a person sees which key of the settings page belongs to the repository. - Deletes the downloaded file after the upload. It never prints, logs or traces the key, and keeps no other copy.
--dry-runsends no request and prints the plan.
To rotate the key of one repository, the person runs the command again and deletes the old key, by its fingerprint, on the settings page.
Acceptance criteria
- Tests with a fake GitHub (
GET /app, the installation, the environment, its public key, the variables and the secret) show the requests in order, refuse a key of another App, and show no key in the output, the log or a trace attribute. -
--dry-runmakes no request, and the downloaded file is gone after a run that succeeds. - A person runs the command for dan-petty/infra and dan-petty/devtools with one new key each, and the Release job of each repository passes the credential check.
Person steps
- The person runs the command and makes the key on the settings page of the App. Only a person makes keys and changes secrets.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
effort/highEffort High: much work, in one pull requestowner/agentOwner Agent: an agentic coder works on the itempriority/p2-mediumPriority P2: standard workscope/ghThe devops gh commandssource/agentFiled by an agentstatus/in-progressStatus In Progress: an owner works on the itemtype/featureType feature: a new functionvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 22, 2026
Both set up the release App and its environment variables, but #1864 is a one-time manual checklist while the candidate is a reusable devops command.[-]feat(gh): make and set the release App credentials of a repo[/-][+]feat(gh): set a release App key of its own in each repository[/+]dan-petty commentedon Nov 22, 2026
Deferred by the owner on 2026-11-22: "let's use the same release key for now and schedule the work for later". Until this item is built, dan-petty/infra and dan-petty/devtools use the key of the release App that dan-petty/devops-cli uses. When this command exists, run it for each of the 2 repositories, and then delete the reused key from their environments only by replacing it, as the command does.