Repository navigation
Description
Problem or Motivation
devops repos onboard plans the webhook of the Service from service.webhook_url and service.webhook_secrets of the local configuration. On a workstation that does not hold the values of the cluster, the plan is wrong, and --confirm would write it.
Read on 2026-11-26 in the devcontainer, where service.webhook_url is not set:
- The setting has the default
https://hooks.example.com/webhooks/github(src/devops_cli/config/settings.py:1859). devops repos onboard --all --plangave this row for each of the 9 repositories, although each repository has a hook that works:12. Webhook: pending,create the hook of https://hooks.example.com/webhooks/github,secret in service.webhook_secrets.src/devops_cli/github/onboard/service_rows.py:247reads the URL with no check that a person set it.
A run with --confirm would thus create a hook to the example host in each repository. The row also gives a hook whose secret the local service.webhook_secrets lacks a new secret. From a workstation with no secret map, that changes the secret of the live hook, and the Service then refuses each delivery until push-secrets and deploy-stack (row 13) put the new secret in the cluster.
The owner ran the command on 2026-11-26 with --only 0,1,2,3,4,5,6,7,8,9,10,11 to keep row 12 out. The command must be safe with no such option.
Proposed Solution
Disposition: change the code.
- When
service.webhook_urlhas its default value, row 12 has the statepersonwith one step that names the setting. It plans no hook and writes none. - Row 12 writes a new secret to an existing hook only in the same run that does row 13, so the cluster gets the secret that GitHub got. With
--no-deployor with row 13 out of--only, the row reports the difference and writes nothing. - feat(service): verify GitHub App webhooks with one secret #4417 deletes the row. Until then these two rules hold.
Proof: a test over the fake GitHub API with the default URL gives the state person and sends no request to the hooks routes. A second test with a set URL and no row 13 sends no PATCH to an existing hook.
Existing Tool Considered
The GitHub REST API for repository webhooks, which the command already uses. No new tool.
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Three searches found no relevant tool, only unrelated browser-extension settings pages. The need is an internal guard in the repository's own onboard rows over the GitHub API it already uses, so no external tool covers it.
Lacks:
- Check that service.webhook_url was set by a person, not its default
- Row 12 state
personnaming the setting, planning no hook - No secret write to a live hook without row 13 in the same run
- No PATCH to an existing hook with --no-deploy or row 13 excluded
Proposed design
Problem statement
Add a guard to row 12 of devops repos onboard. When service.webhook_url has its default value, row 12 must report the state person and plan no hook. Row 12 must write a new secret to an existing hook only in the run that does row 13. Today the command plans a hook to the example host on a workstation that does not hold the cluster values. A run with --confirm would create that hook and change the secret of a live hook.
Acceptance criteria
Requirement: Default URL gives a person step
The onboard row 12 SHALL report the state person and name the setting service.webhook_url when the setting has its default value.
Scenario: Default webhook URL in the plan
- WHEN A test in
tests/commands/test_repos_onboard.pyrunsdevops repos onboard --all --planover the fake GitHub API with the defaultservice.webhook_url. - THEN Row 12 has the state
person, its step namesservice.webhook_url, and the plan holds no hook step.
Requirement: Confirm writes no hook from the default URL
The command MUST send no request to a repository hooks route when service.webhook_url has its default value, even with --confirm.
Scenario: Confirm with the default URL
- WHEN A test runs
devops repos onboard --all --confirmover the fake GitHub API with the defaultservice.webhook_url. - THEN The fake records no POST or PATCH to a hooks route and row 12 keeps the state
person.
Requirement: Secret write needs row 13
Row 12 SHALL write a new secret to an existing hook only when the same run includes row 13.
Scenario: Existing hook with row 13 out of the run
- WHEN A test runs the command with a set URL, an existing hook whose secret differs, and row 13 out of
--onlyor--no-deploy. - THEN The fake records no PATCH to the hook and row 12 reports the secret difference.
Requirement: Secret write in the run with row 13
Row 12 SHALL PATCH the new secret to the existing hook when the same run includes row 13.
Scenario: Existing hook with row 13 in the run
- WHEN A test runs the command with a set URL, an existing hook whose secret differs, and row 13 in
--only. - THEN The fake records one PATCH to the hook that carries the new secret.
Existing Tool Considered
The alternatives check of 2026-11-26 in the issue body gives the verdict none and names no tool. No open, maintained tool covers a guard on a configuration default inside the onboard rows. The block lists in Lacks: what the need requires. The change adds those four guards in src/devops_cli/github/onboard/service_rows.py and src/devops_cli/github/onboard/run.py. It uses the GitHub REST API for repository webhooks that the command already uses. Cost to build and keep this code: about 40,000 tokens to build, about 10,000 tokens to keep and fix, and about 4 hours elapsed.
Key questions
- How does row 12 detect that
service.webhook_urlhas its default value?: Row 12 compares the resolvedservice.webhook_urlwith the default value of the setting. The guard runs before the row reads the hook state. (best practice) [sources: src/devops_cli/config/settings.py:1859, src/devops_cli/github/onboard/service_rows.py:247, src/devops_cli/config/env.py, src/devops_cli/config/os_keyring.py]- Chosen: Compare the value with the default. It reads the same resolved setting that row 12 uses now. It needs no change to the config loader.
- Rejected: Check the pydantic-settings
model_fields_set. It records the fields that the constructor got. A merged config that passes the default makes the field look set. - Rejected: Read the raw config file for the key. It ignores the environment and the keyring. The setting can come from either.
- How does row 12 know that the run includes row 13?: The run builds the selected rows from
--onlyand--no-deploy. It passes the selected set to the row-12 builder. Row 12 writes no secret when the set has no row 13. (best practice) [sources: src/devops_cli/github/onboard/run.py, src/devops_cli/github/onboard/service_rows.py:247]- Chosen: Pass the selected row set into the builder. The input is explicit. A test sets it with no command line.
- Rejected: Read the command line again in row 12. It hides the input. It couples the row to the CLI parser.
- What does row 12 report when it writes no secret?: Row 12 reports the secret difference and writes nothing. The step names the setting
service.webhook_secretsand the hook, so a person can run row 13. (best practice) [sources: src/devops_cli/github/onboard/service_rows.py:247]- Chosen: Report the difference in the row. The plan shows the drift with no write. The person sees the cause.
- Rejected: Report the state
personwith a step. The URL is set in this case. The row is no person step; it shows the difference that row 13 fixes.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 26, 2026
A single --confirm run would change live hook secrets on 9 repositories and cause the Service to refuse deliveries until a follow-up deploy, a one-command-away service disruption.Both concern the webhook row in an onboard command, but the candidate fixes a bug in devops repos onboard (repos command) while #7274 adds an event-check to devops roadmap onboard (roadmap command).devops-cli-service commentedon Nov 26, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (4)
Searches run:
devops-cli-service commentedon Nov 26, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
6 remaining items
docs(spec): cite only the command in the step text of #7308
docs(spec): plan #7308 Guard the webhook row against the default URL (#…
devops-cli-service commentedon Nov 27, 2026
The draft pull request #7391 holds the final title and body. In mode
onofroadmap.fix_checks.mode, the watch row marks it ready when its checks pass, and a fix-checks Job repairs a failed check whose name gives the class test, lint or types. In each other case the watch row stops the item: another failed check, a cancelled check, a conflict, a fix-checks Job that ended with no repair, or another mode.Spend: 174 model requests, 22932865 input tokens, 53578 output tokens.
devops-cli-service commentedon Nov 27, 2026
Released in v0.224.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.224.2
devops-cli-service commentedon Nov 27, 2026
Live since 2026-11-27 13:20 UTC