thermograph/.forgejo/workflows
Emi Griffith d6553a7a05
All checks were successful
shell-lint / shellcheck (pull_request) Successful in 15s
PR build (required check) / changes (pull_request) Successful in 20s
PR build (required check) / build-backend (pull_request) Has been skipped
PR build (required check) / build-frontend (pull_request) Has been skipped
secrets-guard / encrypted (pull_request) Successful in 27s
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / gate (pull_request) Successful in 4s
shell-lint / shellcheck (push) Successful in 7s
secrets-guard / encrypted (push) Successful in 15s
build-push: stop a whitespace-tainted REGISTRY_TOKEN failing as "denied"
`docker login --password-stdin` strips exactly ONE trailing newline. `echo
"$T"` adds one. So a secret pasted WITH a trailing newline -- which is what
copying from a terminal, or an editor that terminates files with one, produces
-- arrives at the registry as "<token>\n" and gets back:

    Error response from daemon: Get "https://.../v2/": denied:

with no further detail. That is indistinguishable from a revoked or wrong
token. On 2026-08-01 it stopped every build and deploy in the estate and cost
an afternoon of diagnosis on a credential that was in fact valid: the same
token, tested by hand, returned 200 on /v2/ and was issued a pull,push-scoped
registry token for jinemi/thermograph/backend.

So: strip leading/trailing whitespace and CR/LF before the pipe, and never
`echo` a credential into stdin.

The token now travels through the ENVIRONMENT rather than being interpolated
into the script text. `${{ }}` is substituted before bash parses the line, so a
value containing a quote or a newline changes the shape of the command itself,
not merely its arguments.

Two diagnostics, deliberately asymmetric:

  * empty/unset  -> HARD FAILURE naming where to set it. There is no case where
    proceeding helps.
  * wrong shape  -> WARNING only (length, and whether it is outside [0-9a-f]),
    then attempt the login anyway. A hard assertion on token format would block
    every build the day Forgejo changes that format, which is a worse failure
    than the one being prevented. The warning is enough to turn the registry's
    opaque "denied:" into a diagnosis.

Neither diagnostic prints the value; only its length and character class.

Note the username is not a factor: tested against the live registry, all of
admin_emi, emi and jinemi authenticate identically with a valid token and are
each issued a push-scoped token. Forgejo's container registry authenticates on
the token, not the username.
2026-08-01 10:16:32 -07:00
..
build-push.yml build-push: stop a whitespace-tainted REGISTRY_TOKEN failing as "denied" 2026-08-01 10:16:32 -07:00
build.yml web/worker: add a process-level liveness heartbeat (#80) 2026-07-25 04:13:47 +00:00
deploy.yml infra: split the estate into vps1/vps2 — beta joins prod, dev gets a home (#103) 2026-07-26 06:56:38 +00:00
infra-sync.yml infra-sync: render /etc/centralis.env from the vault 2026-08-01 09:10:34 -07:00
observability-validate.yml infra: split the estate into vps1/vps2 — beta joins prod, dev gets a home (#103) 2026-07-26 06:56:38 +00:00
ops-cron.yml openbao: make the parity gate actually work, and run it nightly 2026-08-01 08:36:35 -07:00
pr-build.yml CI: port the split repos' workflows to per-domain path-filtered monorepo pipelines 2026-07-22 22:11:33 -07:00
secrets-guard.yml CI: port the split repos' workflows to per-domain path-filtered monorepo pipelines 2026-07-22 22:11:33 -07:00
shell-lint.yml shell: add shellcheck CI guard and drive the tree to zero findings (#19) 2026-07-23 22:26:05 +00:00