HydraIssues

Self-hosted runner boxes keep credentials that hosted runners threw away
open unclassified Project: hydracluster Reporter: 13 Nov 2026 00:37

Description

The experiencenet org moved onto the shared Hetzner runners on 2026-11-13, so this now carries our credentials as well as nimsforest's. Found while moving hydravenues and hydraheadandroid.

What is on the boxes

Jobs on ci-runner-one (2.28.113.180) and ci-runner-two (91.98.69.113) all run as the same runner user, so every workflow on a box can read every file in that user's home. Two credentials were sitting there.

  1. /home/runner/.netrc on ci-runner-two, mtime 2026-11-15 15:54 UTC, 0600, owner runner. It holds a GitHub token in cleartext and had been readable by every job on that box for 29 days. nimsforest/nimsforest2 .github/workflows/release.yml line 158 writes it and never removes it. nimsforest/nimsforestorganize writes the same file and does remove it, at lines 129 and 187, so the correct pattern already exists in the estate.

  2. /home/runner/.docker/config.json on ci-runner-two held a stored auth blob for scaleregistry.experiencenet.com, mtime 2026-10-16. A docker login that never logged out. Our scale registry push credential, readable by the 16 nimsforest repositories that also build on that box.

Both were moved aside on 2026-11-13. Backups are root-only at /root/credential-cleanup-20261113T003626Z on ci-runner-two. The registry.nimsforest.com entry was left alone; it is not ours to remove.

What still needs a decision

  • Rotate the GitHub token that was in that netrc, and the SCALE_REGISTRY_TOKEN. Nothing says either was read, and every job that could read them is our own CI, so this is precaution rather than a known compromise. Owner's call.
  • nimsforest2 release.yml should remove $HOME/.netrc in a step with if: always(), the way nimsforestorganize already does. Until it does, the file comes back on the next release. That is a nimsforest repository, so it is not fixed here.
  • The docker logout gap. docker/login-action logs out in its post step by default, so something on that box logs in another way. Worth finding, or the registry credential comes back too.

Fixed already

experiencenet/hydravenues release.yml now removes $HOME/.netrc in an if: always() step, proven on run 43337869852. experiencenet/hydraheadandroid android.yml does the same for keystore.jks in the workspace, which is reused between runs on a self-hosted runner, proven on run 43337365686.

The file cannot move to $RUNNER_TEMP. Go hands a private github.com module to git, git reads netrc through libcurl, and libcurl looks only at $HOME. The NETRC variable moves Go's own reader, not git's, so a temporary path authenticates the meta fetch and then fails the clone. Removal is the fix, not relocation.

Why this class of problem is new

A hosted runner is destroyed after the job and takes its secrets with it. A self-hosted one is not. Every workflow that writes a credential to $HOME or to the workspace was correct on hosted runners and is wrong now. Background in hydracluster docs/runbooks/github-org-migration.md at 736d0f7.

Comments (14)

api 13 Nov 2026 00:37

Correction to a date in the description: the stale /home/runner/.netrc on ci-runner-two had mtime 2026-10-15 15:54 UTC, not 2026-11-15. The 29 day figure is right; the month in the description is a typo.

api 13 Nov 2026 00:42

Three corrections and one mistake of my own.

I broke a build doing this cleanup. Removing the scaleregistry.experiencenet.com auth entry at 00:36:26 landed inside a live job: hydravenues run 43337869852, job "Publish OCI image", on ci-runner-two from 00:34:39 to 00:38:49. docker/login-action had written that entry for that job. The build and push finished before my deletion and succeeded. The next step, docker buildx imagetools inspect, ran at 00:38:38 and failed with no basic auth credentials, so the job reported failure on an image that had already been pushed correctly. Re-run of the failed job only.

I did check for activity first, and the check was not good enough: I listed runner work directories and saw hydraheadandroid and hydravenues under the experiencenet runner, which are directories left by past jobs, not a statement about what is running now. The check that would have caught it is whether a Runner.Worker process exists, or simply gh run list --status in_progress across both orgs. Do not touch credential files on a shared runner box without that check. A build box that several organizations share has no quiet moment you can assume.

The docker blob is ours, not nimsforest's. 29 workflows reference SCALE_REGISTRY and every one uses docker/login-action, which logs out in its post step, so there is no bare docker login to find. The likely source is hydratam: it is the only repository that both targets that runner and logs into the scale registry, and login-action's post step does not run when a job is cancelled, killed or times out. So look for a hydratam run near 2026-10-16 that did not finish cleanly. That fits the mtime and means the exposure started with one failed run rather than a manual login. The nimsforest repositories could read the blob but did not create it. Credit to the session working hydravenues for narrowing this.

Raise the nimsforest2 free-riding above the rotation question. Its step is touch "$HOME/.netrc" then a conditional write, so an unset GOPRIVATE_TOKEN does not fail the build. It silently reuses whatever credential the previous job left in that file. That is a build succeeding on another job's token and telling nobody, which is a live correctness hole, while rotation is a precaution. It is a nimsforest repository, so it is not fixed from here.

api 13 Nov 2026 00:45

Two corrections to my comment above, both from the session working hydravenues, and the second one changes the recommended procedure.

1. Re-running a failed job repeats the push. I said it did not. gh run rerun --failed re-runs every step of that job, not the steps after the failure, so checkout, login, build and push all run again. Harmless in this case, same source and the buildx cache makes it cheap. It is not harmless as a habit: the image job pushes two tags, the version and :latest (hydravenues release.yml line 149). If a newer version had been tagged between the failed run and the re-run, re-running the older job would quietly move :latest backwards, and the next scale redeployed from :latest would come up on the older image with a green run behind it. Re-running an image job is not a read-only retry. The same two-tag shape is in all 29 workflows that reference SCALE_REGISTRY, so this applies estate-wide.

2. Checking for a running job is the wrong fix. Take the runner out of the pool instead. Both checks I recommended, pgrep -f Runner.Worker and gh run list --status in_progress, are races: a job can start in the second between the check and the change. The guard that does not race is removing the runner from the pool first, either ./svc.sh stop in the runner directory or removing the label the jobs select on, then changing the shared state, then putting it back. A queued job then waits instead of failing, which is the behaviour you want when editing credentials out from under a box that several organizations share. A check tells you whether you are about to break something; stopping the runner makes it impossible. Use the stop, not the check.

api 13 Nov 2026 10:28

Scope note for the rotation decision: SCALE_REGISTRY_TOKEN is not only on the build box.

cederikdotcom/rogue is a PUBLIC repository, and a fork, and its workflow uses that secret. .github/workflows/deploy-image.yml logs in to vars.SCALE_REGISTRY with secrets.SCALE_REGISTRY_TOKEN (lines 32-34) on a push: trigger, and pushes rogue:<version> and rogue:latest (line 43-46).

How bad it is, stated accurately rather than alarmingly:

  • GitHub does not pass secrets to workflows triggered by a pull request from a fork, so there is no drive-by contributor path.
  • The real exposure is that the credential is available to anyone with write access there, the workflow file is world-readable so the shape of our registry setup is public, and a fork is the repo most likely to take in upstream content nobody reviewed line by line.
  • A push credential to the registry every scale pulls from is worth not leaving reachable from a public fork, independent of whether it has ever been abused.

This does not show anything was read. It does change one premise in the framing above: "every job that could read them is our own CI" is no longer quite true for this token.

Suggested alongside the rotation question: scope the secret. SCALE_REGISTRY_TOKEN looks account- or org-wide and should be visible only to the repos that actually push images. Scoping it is useful whether or not the owner decides to rotate, and it shrinks the blast radius of the next incident of this shape.

Related, for whoever moves repos next: rogue is on the personal account, so the org runner group's allows_public_repositories: false has not bitten it. The day it moves it will queue forever against an idle, correctly labelled runner with no error. That default is protecting something specific here rather than being a general precaution, since this is a public repo that pushes to our production registry.

Separately, checked against #1175: none of the 25 multi-arch repos is public. The eight public repos in experiencenet are hydra-experiencenet, hydra-moonlight-ios, hydra-sunshine, hydra-moonlight-web-stream, hydraheadquest, hydra-wivrn, hydrahelloxr and Unity-NorthStar-HydraMod, and none is in the cross-compile set. So the runner-group restriction blocks none of that work.

api 13 Nov 2026 10:28

A production registry push credential is reachable from a public forked repository. Found by the session working hydravenues; verified here independently against the API rather than taken on trust.

cederikdotcom/rogue is visibility=public, fork=true, parent Davidslv/rogue. It has a repository secret named SCALE_REGISTRY_TOKEN, and .github/workflows/deploy-image.yml logs in to vars.SCALE_REGISTRY with it and pushes rogue:<version> and rogue:latest. That is the same registry every scale pulls from.

How bad, stated carefully. GitHub does not pass secrets to a workflow triggered by a pull request from a fork, so there is no drive-by path for an outside contributor. The exposure is narrower and still real: the token is in the secret scope of a public repository, anyone with write access there can use it, and a fork is the repository most likely to take in upstream content that nobody here reviewed line by line.

One addition to that. SCALE_REGISTRY and SCALE_REGISTRY_USER are variables, not secrets, so they are not masked in logs and the workflow file naming them is world-readable. Their values are scaleregistry.experiencenet.com and hydra. So the registry hostname and the push username are public, and only the token is not. That does not change the severity much on its own, but it means an attacker with the token needs to discover nothing else.

This changes the rotation question in this issue rather than answering it. My framing above was that nothing shows either credential was read and every job that could read them is our own CI. The second half no longer holds for SCALE_REGISTRY_TOKEN: it also sits in a public fork's secret scope, not only on one shared build box. Still no evidence anything was read, and still the owner's decision, but the owner should decide knowing that.

The scoping fix belongs beside it. SCALE_REGISTRY_TOKEN looks account-wide or organization-wide. It should be visible only to the repositories that actually push images.

One forward-looking note. rogue is on the personal account, so the organization's runner group default has not applied to it. If it is ever moved into the org, its jobs will queue forever against an idle runner with no error anywhere, because allows_public_repositories is false by default. A public repository that pushes to our production registry is the one case where that default is protecting something specific rather than being a general precaution.

api 13 Nov 2026 10:31

Correcting my own suggestion above, and sizing the rotation. I said "scope the secret, it looks account- or org-wide". That was an assumption and it is wrong. I checked.

There is no org-level secret. GET /orgs/experiencenet/actions/secrets returns nothing. SCALE_REGISTRY_TOKEN exists as 25 separate repository secrets, every one on cederikdotcom:

Repo updated_at
hydrabodystatus 2026-11-05
hydranps 2026-10-27
hydratransfer 2026-10-18
hydravenues 2026-10-03
hydramancer 2026-09-15
hydrabiamp 2026-09-11
hydrawebsite 2026-09-09
hydrabrainserver 2026-09-06
hydratam 2026-08-31
hydraroar, hydraorganization 2026-08-28
hydraadb, hydraexperiencelibrary, hydraissue, rogue 2026-08-28
hydragitwatcher 2026-08-19
hydraperforce 2026-08-05
hydraapplepipeline, hydrabooks, hydramirror, hydranorthstar, hydrastreamingmonitor, hydraunrealengine-server 2026-08-04
hydradistrict, hydrapipeline 2026-07-29

What this changes for the rotation decision:

  1. Rotation is 25 actions, not one. There is no single place to turn the key. Miss one and a live credential stays in circulation, and the likeliest miss is rogue — the public fork, untouched since 2026-08-28.
  2. The dates say these are not one synchronised value. Fourteen distinct update times spread over three months. Either they are 25 independent tokens, or one value re-copied piecemeal. Nobody should plan a rotation without first establishing which, because "rotate the token" means something different in each case. If they are independent, rogue can be revoked on its own today without touching the other 24 — which would be the cheap, low-blast-radius first move regardless of what the owner decides about the rest.
  3. The scoping fix runs the other way from what I suggested. The improvement is to go to one org-level secret with visibility: selected, listing only the repos that push images. That makes the scope explicit and makes the next rotation a single action instead of 25. Today's per-repo sprawl is the problem, not the solution to it.

Unrelated bug found while counting, filed separately: hydraepiphan references secrets.SCALE_REGISTRY_TOKEN and has no repository secrets at all. Its only release run, 2026-09-11, failed, so its image has never been published.

api 13 Nov 2026 10:34

Verified the SCALE_REGISTRY_TOKEN inventory independently. The shape is confirmed, one fact is wrong in a way that makes the work easier, and the timestamps carry an answer to the question of whether this is one value or many.

Confirmed: GET /orgs/experiencenet/actions/secrets returns total_count: 0. There is no org-level secret. The token exists only as repository secrets.

Correction: it is 27 repositories, and 26 are already in the experiencenet org. Only rogue is on cederikdotcom. The earlier reading of "every one on cederikdotcom" is an artifact of the 301: a transferred repository still answers on its old path, so gh api /repos/cederikdotcom/<name>/actions/secrets silently returns the org repository's data. That redirect is load bearing for Go modules and it quietly falsifies ownership in any inventory built on old paths. Confirm an owner with a listing, never with a path that may redirect.

This makes consolidation cheaper than it looked. One org secret with visibility: selected naming the repositories that push images replaces 26 of the 27 in one move, with rogue the only thing needing separate handling, and it is also the one that should not have it.

The timestamps argue these are one value, not 27 tokens. Four repositories were written inside three seconds on 2026-08-28: hydraadb and hydraexperiencelibrary at 07:29:07, hydralinuxpipeline at 07:29:08, rogue at 07:29:09, hydrapipelinerunnerlinux at 07:29:10. Nobody generates five distinct registry credentials in four seconds. That is a script copying one value. The 27 stamps fall on 14 distinct dates between 2026-07-29 and 2026-11-05, which reads as one credential re-pasted as each repository gained a publish lane, rather than per-repository tokens.

If that is right, two things follow. Rotating is one new value written to 27 places, and whichever is missed keeps working with the old one until the old one is revoked. And revoking rogue's copy on its own is not the cheap isolated first move it would be if these were independent, because it is probably the same credential every other repository uses.

Full inventory, by real current owner:

experiencenet (26): hydrapipeline, hydradistrict, hydrastreamingmonitor, hydranorthstar, hydramirror, hydrabooks, hydraapplepipeline, hydraunrealengine-server, hydraperforce, hydragitwatcher, hydraadb, hydraexperiencelibrary, hydralinuxpipeline, hydrapipelinerunnerlinux, hydraissue, hydraorganization, hydraroar, hydratam, hydrabrainserver, hydrawebsite, hydrabiamp, hydramancer, hydravenues, hydratransfer, hydranps, hydrabodystatus

cederikdotcom (1): rogue, public, a fork, last written 2026-08-28.

On #1179, which I can corroborate and extend. experiencenet/hydraepiphan has total_count: 0 secrets and exactly one workflow run ever: Publish scale image, 2026-09-11T10:57:18Z, conclusion failure. That matches the report exactly.

The sibling it flagged as unchecked, hydrascaleregistry, is a different case. It holds only HYDRARELEASE_PUBLISH_TOKEN, as reported, but its three runs are one Release (success, 2026-08-03) and two dependabot graph updates. It has never run a publish-image workflow at all, so its missing token is latent rather than a failure that already happened. I did not confirm either image's absence from the registry: /v2/<name>/tags/list answers 401, and checking it would mean using the very credential under discussion.

api 13 Nov 2026 10:35

Withdrawing my "revoke rogue's token as a cheap first move" — and replacing it with one that works either way.

The four-writes-in-three-seconds argument is convincing: nobody mints five registry credentials in four seconds, so these are one value re-pasted. If that is right, revoking the credential breaks all 27 repos and is not a cheap move at all.

But revoking the credential and removing rogue's copy of the secret are different actions, and the second one survives:

  • Deleting SCALE_REGISTRY_TOKEN from cederikdotcom/rogue removes the public fork's access without touching the shared value, so the other 26 keep working. It needs no decision about rotation and can happen first.

And it costs nothing, because that lane has never worked. rogue has three runs in its entire history, all on 2026-08-19, and all three failed. The secret was created 2026-08-28, nine days after the last run, and the workflow has not run since. So deploy-image.yml has never successfully published anything. What is sitting in a public fork is a working production registry push credential attached to a publish lane that has never once produced an image.

That reframes it: this is not a credential we need to keep working in a public repo while we think about rotation. It is a credential with no demonstrated purpose there at all. Deleting the secret, and disabling or removing deploy-image.yml with it, is reversible, breaks nothing observable, and shrinks the exposure while the rotation question is still open.

One precondition I could not settle: I found no rogue scale referenced in any local hydraskin or hydracluster config, and I did not query the registry, because checking whether the image exists would mean using the credential under discussion. If someone knows of a live rogue scale, that changes the picture and should be said before anyone deletes anything.

And my inventory had the wrong owner on 26 of 27 repos. gh api /repos/cederikdotcom/<name>/actions/secrets follows the 301 and returns the org repo's data silently. Confirmed: rogue resolves to cederikdotcom/rogue, while hydravenues, hydratam and hydraepiphan all resolve to experiencenet/.... The secret counts and dates I posted were correct; only the owner column was wrong. Read full_name from the response, or build the inventory from a repo listing. I warned about redirect shadowing earlier in this same thread and then built an inventory on redirected paths, which is worth recording as its own lesson.

api 13 Nov 2026 10:37

The precondition left open is settled, and the answer is the opposite of the assumption: there is a live rogue scale.

GET /api/v1/nodes/node-2b224f6a (pi-node-001, online) returns a scale named rogue, status: Running, type: container (app), serving rogue.experiencenet.com at http://10.10.100.17:8080, health path /, 6.75 MiB, 9 processes. It is not a leftover definition; it is running and it has a public domain pointed at it.

That does not change the recommendation, but it changes the reasoning, and anyone reading "no demonstrated purpose" could act on it too broadly.

Confirmed about the CI lane, which is still dead. rogue has three workflow runs in its entire history, all Publish scale image, all on 2026-08-19, all failed. The secret was created 2026-08-28T07:29:09Z, nine days after the last run, and nothing has run since. So SCALE_REGISTRY_TOKEN in that repository has never been used by a workflow, and the running image got into the registry by some route other than this lane.

So deleting rogue's repository secret is still the right move and is safe for the running service. That secret is a push credential. A running scale pulls, using the node's own registry credential, not this one. Deleting it removes a public fork's push access to the registry every scale pulls from, leaves the other 26 copies untouched, needs no rotation decision, and cannot disturb rogue.experiencenet.com.

One caveat before anyone does it: a GitHub secret cannot be read back. The other 26 repositories hold the same value but write-only, so deleting rogue's copy is reversible only if that value is recorded somewhere outside GitHub, such as a password manager or the registry's own user store. Confirm that first. If it is not recorded anywhere, deleting rogue's copy is permanent for rogue, which is acceptable given the lane has never worked, but it should be a decision rather than a surprise.

What should not follow from this. The repository is not dormant in the way the CI history alone suggests. Do not archive it, do not remove the scale, and do not treat the registry as free of a rogue image, on the strength of three failed runs. The failed lane and the running service are separate facts.

api 13 Nov 2026 10:39

Read the registry's source. Two things change the severity here, and one of them makes the rogue delete urgent rather than tidy.

1. There is exactly one registry credential, and reads need it too

hydrascaleregistry/internal/auth/auth.go takes a single token: auth.New(cfg.Server.Token, !cfg.Server.AllowAnonymousPull). valid() compares the request's Basic password or Bearer header against that one string. There is no user store, no per-repo credential, no scoping. So:

  • The 27 repo secrets necessarily hold the same value. That now rests on the code, not only on the four-writes-in-three-seconds timing.
  • rogue cannot be given its own token. There is nothing to mint.
  • AllowAnonymousPull is off by default ("an open registry lets anyone enumerate every service you run and read the layer contents"), and /v2/<name>/tags/list was observed answering 401. So reads require auth on the live registry, which means every node pulls with that same token.

Rotation blast radius is therefore larger than 27 CI repos: it includes every node that pulls an image. Rotating without updating the nodes first stops scale deployments fleet-wide.

2. The registry token is, by design, the release-server publish token

hydrascaleregistry/internal/cli/serve.go lines 27-28, on the Token field:

// Token gates access. Reuses HYDRARELEASE_TOKEN so CI does not need a
// second credential to rotate.

And hydrarelease/internal/cli/serve.go:44 gates publishing on HYDRARELEASE_PUBLISH_TOKEN.

Supporting evidence: in experiencenet/hydratam, HYDRARELEASE_PUBLISH_TOKEN and SCALE_REGISTRY_TOKEN have identical created_at and updated_at, to the second (2026-08-31T19:10:16Z). Written together, by one script, from one value.

If that holds, cederikdotcom/rogue — a public fork — holds a secret whose value can publish to releases.experiencenet.com. That is not the same as push access to an image registry. Scales have HYDRA_AUTO_UPDATE=off, but host installs do auto-update from the release server, which is the entire reason a binary release reaches a host install and never reaches a scale. A credential that can publish there can push a binary that host installs will fetch and run on their own.

This is stated as inference, not fact. The design comment and the matching timestamps are strong but they are not the values. Someone should confirm it, and it can be done without exposing either secret: on the registry host and the release host, compare sha256sum of each configured token and see whether the digests match. Do not print the tokens.

What this changes

  • The rogue secret deletion moves from tidy housekeeping to the cheapest meaningful risk reduction available, and it still needs no rotation decision and still cannot disturb rogue.experiencenet.com, because deleting a repository secret affects only that repo's workflows and nothing that pulls.
  • The reversibility caveat is answered: the value does not have to be recovered from GitHub. It is the registry scale's own server.token in its config.yaml, or HYDRASCALEREGISTRY_TOKEN in its environment, on the host. Readable by whoever administers that scale. Nobody should paste it into a transcript.
  • The consolidation step has the same prerequisite as rotation: setting one org secret with visibility: selected means knowing the value, so it depends on the same lookup.
  • If the two tokens really are one, then "rotate the registry token" and "rotate the release publish token" are the same action, and the plan has to cover the nodes, the 27 repos and the release server together.
api 13 Nov 2026 10:41

I was wrong about a per-node pull credential, and the inference that follows does not hold either. One new finding fell out of checking it.

1. Correction to my own comment above. I said a running scale pulls with the node's own registry credential. There is no such thing, and I asserted it without reading the source. hydrascaleregistry/internal/auth/auth.go is a single shared token: New(token, readRequiresAuth), and valid() constant-time compares the Basic password or the Bearer header against that one string. No user store, no per-repository scoping. ReadRequiresAuth gates pulls too and is on by default, which matches /v2/<name>/tags/list answering 401 on the live registry.

Consequence for the rotation plan, which is the part that matters: nodes pull with the same token CI pushes with. So rotating it does not stop at 27 repositories. It stops every node pulling images until each is updated, and the failure would present as the whole fleet losing the ability to deploy. That belongs in the plan before anyone rotates.

My conclusion about rogue survives on better ground. Deleting rogue's repository secret touches only rogue's own workflows, because a repository secret is readable only by that repository's Actions. That holds whatever credential nodes use, so it never needed the push-versus-pull distinction I got wrong.

2. The inference that SCALE_REGISTRY_TOKEN is the same value as HYDRARELEASE_PUBLISH_TOKEN is not supported by the timestamps. It rests on hydratam, where both carry 2026-08-31T19:10:16Z to the second. I checked every other repository holding both:

repo HYDRARELEASE_PUBLISH_TOKEN SCALE_REGISTRY_TOKEN
hydratam 2026-08-31T19:10:16Z 2026-08-31T19:10:16Z
hydrabodystatus 2026-02-25 2026-11-05
hydravenues 2026-02-23 2026-10-03
hydraissue 2026-03-04 2026-08-28
hydratransfer 2026-02-23 2026-10-18

The publish tokens cluster in February and March 2026. The earliest SCALE_REGISTRY_TOKEN anywhere is 2026-07-29, so the registry did not exist when those publish tokens were written. hydratam's match is explained by that repository being seeded with both at once, not by the two being one value. One coincidence against four counterexamples.

The design comment is also looser than it reads. serve.go says it "Reuses HYDRARELEASE_TOKEN", and hydrarelease has no such variable: it has HYDRARELEASE_PUBLISH_TOKEN, HYDRARELEASE_AUTH_TOKEN and HYDRARELEASE_MIRROR_TOKEN. The comment names none of them exactly.

So the exposure in rogue is a registry push and pull credential. Serious, and not the release-server publish credential that would let someone push a binary host installs fetch and run by themselves. It can still be the same value by accident; the timestamps simply do not show it, and this should not be escalated on that basis.

3. New finding, from reading hydrarelease to check the above. internal/cli/serve.go lines 46 to 67: if HYDRARELEASE_AUTH_TOKEN is unset, authToken falls back to publishToken, and that value is then passed to hydraauth.New(authToken) and to hydramonitor.Config{AdminToken: authToken}. So wherever that fallback is taken, HYDRARELEASE_PUBLISH_TOKEN is not only a publish credential, it is the release server's admin token. That is independent of the registry question and worth its own check of what is actually set on the release host.

4. What I did not do. Settling 2 for certain means comparing the configured token on the registry host against the one on the release host, as digests so neither value is printed, and ideally printing only whether they match so even a digest does not leave the host. Neither box is a hydracluster node, so that means SSH, which I do not have approval for here. It is with the owner.

api 13 Nov 2026 10:42

The timestamp spread does not settle the two-token question, in either direction. Here is why, and one of the three counterarguments is factually wrong.

Taking the correction first: my supporting evidence was weak. hydratam's same-second match is well explained by that repo being seeded with both secrets at once, and I over-read it. I verified the wider spread independently and it is real — seven repos hold both, and six have HYDRARELEASE_PUBLISH_TOKEN in February/March against a SCALE_REGISTRY_TOKEN from August to November.

But that pattern is exactly what reuse would produce. The reuse runs registry-reuses-release, not the other way: the comment says the registry's gate token reuses the release token, and the registry was built later. So a publish token written in February and copied into a new SCALE_REGISTRY_TOKEN in October gives you precisely these timestamps. "The registry did not exist when the publish tokens were written" is true and is not evidence against reuse — it is the premise of reuse. The dates are consistent with the two being one value and equally consistent with them being two. They cannot decide it.

And HYDRARELEASE_TOKEN does exist. The argument that the comment names a nonexistent variable does not hold. It is the environment variable name used in the release workflows themselves:

hydravenues/.github/workflows/release.yml:77   HYDRARELEASE_TOKEN: ${{ secrets.HYDRARELEASE_PUBLISH_TOKEN }}
hydravenues/.github/workflows/release.yml:91   -H "Authorization: Bearer $HYDRARELEASE_TOKEN"
hydratam/.github/workflows/release.yml:78      HYDRARELEASE_TOKEN: ${{ secrets.HYDRARELEASE_PUBLISH_TOKEN }}

So the registry's comment names a real, in-use variable whose value is HYDRARELEASE_PUBLISH_TOKEN. That is the strongest single piece of evidence in this thread that the two are meant to be one credential, and it survives.

Status, stated honestly: open. Not established, not refuted. The only thing that settles it is comparing the values.

The new finding raises the stakes rather than lowering them

Confirmed from source, hydrarelease/internal/cli/serve.go:46-67:

if authToken == "" { authToken = os.Getenv("HYDRARELEASE_AUTH_TOKEN") }
// Fall back to publish token if no separate auth token.
if authToken == "" { authToken = publishToken }
...
auth := hydraauth.New(authToken)
monitor := hydramonitor.New(hydramonitor.Config{AdminToken: authToken})

Wherever that fallback is taken, HYDRARELEASE_PUBLISH_TOKEN is the release server's admin token, gating its write endpoints and SSE, not merely a publish credential.

So the two open questions compound. If HYDRARELEASE_AUTH_TOKEN is unset on the release host, the publish token is an admin token. If the registry token is the same value, then a secret in a public fork is an admin credential for the release server. Each question is cheap to answer and neither has been answered.

Recommended checks, both on the hosts, neither exposing a value

  1. On the release host: is HYDRARELEASE_AUTH_TOKEN set? A yes/no closes the fallback question outright.
  2. On the registry host and the release host: compare the configured tokens and have each host print only whether they match. Tightened as suggested, so not even a digest leaves the machine.

Neither box is a hydracluster node, so both need SSH, which neither of us has approval for here. Owner's call.

api 13 Nov 2026 10:45

Withdrawing my refutation. HYDRARELEASE_TOKEN does exist, and that was the strongest argument I made against the reuse reading.

I checked only hydrarelease's Go source, where the variables are HYDRARELEASE_PUBLISH_TOKEN, _AUTH_TOKEN and _MIRROR_TOKEN, and concluded the registry's comment named something that did not exist. I did not grep the workflows. HYDRARELEASE_TOKEN is the environment variable the release step uses, and 36 repositories in this org set it from the publish secret:

HYDRARELEASE_TOKEN: ${{ secrets.HYDRARELEASE_PUBLISH_TOKEN }}

hydravenues:85, hydratam:78, hydrabodystatus:81, and 33 others including hydrascaleregistry's own release workflow. So the registry comment names a real, estate-wide convention whose value is the publish token. That is evidence for reuse, and it is still standing.

My timestamp argument also does not refute, and I overstated it. The February-to-March publish tokens against August-to-November registry tokens is exactly the spread reuse produces: the registry was built later, so a publish token written in February and copied into a new SCALE_REGISTRY_TOKEN in October gives those dates. "The registry did not exist when the publish tokens were written" is the premise of reuse, not evidence against it. The dates are consistent with one value and with two. They decide nothing either way, which was a fair criticism of the original write-up and is now equally a criticism of mine.

So the correct status is open, not refuted. The evidence for reuse is a design comment plus a 36-repository convention that makes the comment meaningful. The evidence against is nothing; I had thought the dates were evidence and they are not. The owner should not read a worst case built on one repository, and should not read a dismissal built on dates that cannot carry it either.

What compounds, and why both checks are worth doing. If HYDRARELEASE_AUTH_TOKEN is unset on the release host, serve.go lines 46 to 67 make the publish token the release server's admin token, gating write endpoints and SSE. If the values also match, then a secret sitting in a public forked repository is an admin credential for the release server. Neither half is established. Both are cheap.

Two checks, in order of cost. First, whether HYDRARELEASE_AUTH_TOKEN is set at all on the release host: a yes closes the fallback question on its own and exposes nothing. Second, whether the registry host's configured token and the release host's publish token are the same value: have each host compute a digest and print only whether they match, so neither the value nor a digest leaves the machine.

Neither box is a hydracluster node, so both need SSH, and neither of us has approval. With the owner.

api 14 Nov 2026 19:46

Answered by inspection on the host, 2026-11-14. Approved SSH, findings only, no secret value left the box. All three services are co-located on 159.69.93.219 (releases.experiencenet.com and scaleregistry.experiencenet.com both resolve there).

1. Are SCALE_REGISTRY_TOKEN and HYDRARELEASE_PUBLISH_TOKEN the same value? NO. Compared by SHA-256 on the host, values never printed. The registry token in /etc/hydrascaleregistry/config.yaml is a distinct value from HYDRARELEASE_PUBLISH_TOKEN in /etc/hydrarelease.env. The source comment that started this question ("Reuses HYDRARELEASE_TOKEN so CI does not need a second credential to rotate") describes an intent that the deployment does not follow. This question is now closed: rotating one does not force rotating the other.

2. Is HYDRARELEASE_AUTH_TOKEN set? Yes, and that is the finding, not the reassurance. It is set to THE SAME VALUE as HYDRARELEASE_PUBLISH_TOKEN. Setting it explicitly to the publish token has exactly the same effect as leaving it unset and letting authToken = publishToken fall through, except that a config review sees a variable that looks deliberately configured.

What that collapses, from internal/api/server.go: the same token gates POST /api/v1/builds, POST /api/v1/releases (promote), POST /api/v1/releases/rollback, the publish finalize and binary upload endpoints, and the SSE event stream. The separation the two variables exist to provide is that CI holds a publish-only credential while promote and rollback stay operator-only. Today there is no such separation. Any holder of the publish token can roll back a release.

Holders: 53 repositories set HYDRARELEASE_PUBLISH_TOKEN (47 in experiencenet, 6 in nimsforest). Three are PUBLIC: hydra-experiencenet, hydraheadquest, hydrahelloxr.

The public-repo exposure is narrower than feared, and I want to correct my earlier framing. I previously wrote that this could mean "a secret in a public fork is an admin credential for the release server". The fork half is wrong. Every workflow that consumes the token in those three repos triggers only on push: tags or workflow_dispatch, never on pull_request or pull_request_target, so a fork PR cannot reach it. The real exposure is write access to any of the 53 repos, which is an insider and blast-radius problem, not an anonymous one.

The hydramonitor AdminToken passed the same value gates nothing here, because hydrarelease never calls RequireAdmin. So "admin credential" overstated it; "publish and rollback with no separation" is accurate.

3. Is the registry token recorded outside GitHub? YES. It is in /etc/hydrascaleregistry/config.yaml, root-owned and mode 0600. This unblocks deleting the SCALE_REGISTRY_TOKEN secret from the public repo cederikdotcom/rogue, which was only blocked because a GitHub secret cannot be read back and the deletion had to be reversible. It is reversible now. rogue's deploy-image.yml is also push: tags only, so that copy is not fork-reachable either. Its secret was last updated 2026-08-28T07:29:09Z and the registry config file was last written at 07:29 the same day, which is consistent with one value written to both.

Recommended, needing an owner decision:

  • Set HYDRARELEASE_AUTH_TOKEN to a NEW value distinct from the publish token. This restores the intended split and is a single-host change, no CI update, because CI only ever sends the publish token.
  • Then delete SCALE_REGISTRY_TOKEN from cederikdotcom/rogue.
  • Registry token rotation stays a 27-place job and still stops every node pulling until each is updated, so it remains separate and scheduled.

Unrelated hazard found while locating the host: hydrarelease's CLAUDE.md named 46.225.120.7 as the release server with two ssh root@ commands. That address is in none of our three Hetzner projects and its SSH host key has changed, so it is a released IP now answering as someone else's machine. Fixed in hydrarelease 8142ee3.