Repository navigation
Description
Problem or Motivation
Self-hosted Renovate (#4893) runs as its own GitHub App. Renovate accepts only a GitHub App installation token, which expires after 1 hour. It has no App ID or private-key option. The three tools that the Renovate docs name fail the project rules:
actions/create-github-app-tokenruns only in GitHub Actions.- The npm package
github-app-installation-tokenhad its last release in January 2022. - The image
mshekow/github-app-installation-tokenhas no license.
No devops command writes an installation token to a file today. The existing minting code in src/devops_cli/github/app_installation.py (gidgethub) serves the Service App only.
Proposed Solution & Architectural Design
- Add the settings
renovate.github_app_id,renovate.github_app_installation_idandrenovate.github_app_private_key(keyring rowrenovate_github_app_private_key), in the form of theargocd.github_app_*settings. - Add one devops command. The proposal names it, for example
devops github app-token --app renovate --write <path>. - The command reuses
src/devops_cli/github/app_installation.py. It asks for the Renovate permission set: administration read, checks write, statuses write, contents write, vulnerability_alerts read, issues write, metadata read, pull_requests write, workflows write. - It writes the token to a file with mode 0600. It never prints the token, and no log line holds it.
--dry-runmakes no request. It shows the request that a run makes, with the token as a placeholder.- A missing setting gives an error that names the setting.
- An init container of the Renovate CronJob (feat(deps): track regular version updates with Renovate #4893 child 4) runs the command. Only this container mounts Secret
devops/renovate. The Renovate container reads the token file throughconfig.jsand never sees the App key or Secretdevops/devops-cli.
Git identity: Renovate finds <slug>[bot] and <app-id>+<slug>[bot]@users.noreply.github.com from the App token. So no config and no request holds an email address.
Target Subsystem
SDLC, Git & PR Governance (GitHub App auth).
Existing Tool Considered
Rejected: the three tools above; Link-/gh-token (MIT and maintained, but it has no image, so a pod downloads a binary at run time); the External Secrets Operator GithubAccessToken generator (it adds an operator to the cluster); a hand-written JWT in the Renovate pod (home-grown crypto).
Build cost (AGENTS.md rule 3): about 100 lines of code and 150 lines of tests over the existing minting code; about 150k tokens to build; little upkeep; about 1.5 hours of agent time.
Acceptance Criteria
- Tests that fail on the base and pass on the branch:
- The token request body holds exactly the permission set above.
- The token file has mode 0600.
- The token is in no stdout, stderr or log line.
--dry-runsends 0 requests.- A missing setting gives an error that names the setting.
docs/CONFIGURATION.mdanddocs/ENV_VARS.mdlist the 3 settings.
Dependencies
None. Child 2 of #4893. The owner creates the App and stores the 3 settings after this merges (#4893 owner steps 1 to 3).
Source: #4893
Alternatives check of 2026-11-14: in-use.
The repository already uses this tool.
Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub), Apache-2.0, last activity 2026-09-25, maintained.
Proposed design
Problem statement
Self-hosted Renovate needs a GitHub App installation token written to a file. No devops command does this today. The existing minting code in src/devops_cli/github/app_installation.py serves only the Service App. This issue adds the renovate settings, one command that mints the token and writes it to a file with mode 0600, and the tests and docs.
Acceptance criteria
Requirement: renovate-permission-set
The token request body SHALL hold exactly the Renovate permission set: administration:read, checks:write, statuses:write, contents:write, vulnerability_alerts:read, issues:write, metadata:read, pull_requests:write, workflows:write.
Scenario: request body holds the 9 permissions
- WHEN the command mints a token for the renovate app
- THEN the POST body permissions dict holds exactly the 9 named permissions and no others
Requirement: token-file-mode
The token file SHALL have mode 0600.
Scenario: file mode is 0600
- WHEN the command writes the token to a file
- THEN the file mode is 0600
Requirement: token-secrecy
The token SHALL NOT appear in stdout, stderr, or any log line.
Scenario: token absent from all output
- WHEN the command completes a successful token write
- THEN the token string is absent from stdout, stderr, and all log records
Requirement: dry-run-no-request
The --dry-run flag SHALL send 0 HTTP requests and show the request with the token as a placeholder.
Scenario: dry run sends nothing
- WHEN the command runs with --dry-run
- THEN 0 HTTP requests are sent and the output shows the request body with a placeholder for the token
Requirement: missing-setting-error
A missing setting SHALL produce an error that names the setting.
Scenario: missing app id names the key
- WHEN renovate.github_app_id is not set and the command runs
- THEN the error message names renovate.github_app_id
Requirement: docs-list-settings
docs/CONFIGURATION.md and docs/ENV_VARS.md SHALL list the 3 new settings.
Scenario: docs contain the 3 settings
- WHEN the settings are added to the code
- THEN docs/CONFIGURATION.md and docs/ENV_VARS.md each list renovate.github_app_id, renovate.github_app_installation_id, and renovate.github_app_private_key
Existing Tool Considered
gidgethub (https://github.com/gidgethub/gidgethub) is in-use: it covers the JWT signing and installation-token exchange in src/devops_cli/github/app_installation.py. It lacks the CLI command, --write with mode 0600, --dry-run, and the renovate settings. Build cost (AGENTS.md rule 3): about 100 lines of code and 150 lines of tests over the existing minting code; about 150k tokens to build; little upkeep; about 1.5 hours of agent time.
Key questions
- Which open, maintained tool or library covers the need?: gidgethub is in-use. It covers the JWT signing and installation-token exchange. It lacks the CLI command, file writing with mode 0600, dry-run, and the renovate settings. Build cost: about 100 lines of code, 150 lines of tests, about 150k tokens, about 1.5 hours of agent time. [sources: src/devops_cli/github/app_installation.py]
- What is the command name and interface?: devops github app-token --app renovate --write <path>. The --app flag selects the app whose settings to read. The --write flag names the output file. --dry-run is a global flag. (best practice) [sources: src/devops_cli/github/app_installation.py]
- Chosen: devops github app-token --app renovate --write <path>. The body names this form. It follows the existing devops github command group and the --app pattern used by other commands.
- Rejected: devops renovate token --write <path>. A separate command group for renovate. Rejected: the body names the github group, and the command is generic enough to serve other apps later.
- What are the setting names and where do they resolve?: renovate.github_app_id, renovate.github_app_installation_id, and renovate.github_app_private_key. The first two resolve as normal settings. The private key resolves as a keyring row renovate_github_app_private_key. The form follows the argocd.github_app_* settings. (best practice) [sources: docs/CONFIGURATION.md, src/devops_cli/config/settings.py]
- Chosen: renovate.github_app_* mirroring argocd.github_app_*. The body names this form. The argocd section in docs/CONFIGURATION.md shows the pattern: github_app_id and github_app_installation_id as settings, the private key as a keyring row.
- Rejected: A single renovate.github_app object with nested fields. A nested object. Rejected: the body names flat keys in the form of the argocd settings, and the existing code reads flat keys.
- What permission set does the token request?: administration:read, checks:write, statuses:write, contents:write, vulnerability_alerts:read, issues:write, metadata:read, pull_requests:write, workflows:write. The body lists these 9 permissions. (best practice) [sources: src/devops_cli/github/app_installation.py]
- Chosen: The 9 permissions named in the body. The body lists them. They match the Renovate docs' required permission set.
- Rejected: Reuse CONST_GITHUB_APP_TOKEN_PERMISSIONS. The existing constant. Rejected: it holds the Service App's permission set, not Renovate's. The body names a different set.
- What file mode does the token file get, and how is the token kept out of output?: Mode 0600. The command never prints the token. No log line holds it. The existing code already keeps the token out of log lines: the logger.info in mint_installation_token names the permissions, not the token. (best practice) [sources: src/devops_cli/github/app_installation.py]
- Chosen: Mode 0600, token never printed. The body names 0600 and the secrecy rule. The existing code already avoids logging the token.
- Rejected: Mode 0644. World-readable. Rejected: the token is a credential. 0600 is the minimum safe mode.
- What does --dry-run do?: It sends 0 HTTP requests. It shows the request that a run would make, with the token as a placeholder. The body names this behavior. (best practice) [sources: src/devops_cli/github/app_installation.py]
- Chosen: 0 requests, show request with placeholder token. The body names this. It follows the project's dry-run convention: no request, show what would happen.
- Rejected: Send the request but do not write the file. A partial dry-run. Rejected: the body says 0 requests, and the project convention is that dry-run makes no request.
- What error does a missing setting produce?: An error that names the missing setting. The existing configured_app() in src/devops_cli/github/app_installation.py raises ConfigurationError naming each missing setting. The new command follows this pattern. (best practice) [sources: src/devops_cli/github/app_installation.py]
- Chosen: Error names the missing setting key. The body names this. The existing configured_app() already does this for the Service App settings.
- Rejected: Generic error with no key name. A generic message. Rejected: the body requires the error to name the setting, and the existing code already names keys.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(github)scope of the title gives the scope.The command is a child of #4893 and it blocks the self-hosted Renovate setup, but it does not block other work.The command gives the Renovate CronJob a safe App token and it removes the need for an unmaintained third-party tool.The change reuses the existing minting code in app_installation.py and needs about 100 lines of code and 150 lines of tests.Both items work on GitHub App installation token minting, but item 2473 limits the permissions of the Service tokens and the candidate adds a Renovate token-to-file command with its own permission set.dan-petty commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(github)scope of the title gives the scope.It is a prerequisite for the self-hosted Renovate CronJob but does not block the core project.It enables one specific self-hosted Renovate deployment path for a subset of users.The body estimates about 100 lines of code and 150 lines of tests over existing minting code.Both mint tokens for external tools, but #764 covers ArgoCD and Grafana in deploy-stack while the candidate adds a new Renovate-specific command with its own settings.devops-cli-service commentedon Nov 14, 2026
Alternatives check: in-use
Reason: The searches returned no usable results, so I read the facts of the named libraries directly: gidgethub (Apache-2.0/MIT, maintained, v6.0.0) is already the project's GitHub transport per ADR 0006 and already holds the installation-token minting code in
src/devops_cli/github/app_installation.py, so it covers the token-minting half of the need. It gives no CLI command, no--write <path>with mode 0600, no--dry-runand no Renovate settings, so the command, the file handling and the tests in the issue still have to be written; the alternative CLIgh-tokenwas already ruled out in the body.The repository already uses this tool.
Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub)
Covers:
Lacks:
--write <path>option, so nothing writes the token to a file with mode 0600--dry-runthat shows the token request with the token as a placeholder and sends 0 requestsrenovate.github_app_id,renovate.github_app_installation_id,renovate.github_app_private_keyin keyring) and no error that names a missing settingTools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Status set to Ready at 7ba78c5 (see proposed design in issue body).
feat(github): write a Renovate App installation token to a file
chore(main): release 0.166.0 (#5992)
devops-cli-service commentedon Nov 16, 2026
Released in v0.166.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.166.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 18:14 UTC