Repository navigation
PLX-248: plx-ci setup without a token and without op on the forge's runners - #93
Merged
davidjalbers merged 12 commits intoDec 3, 2026
Conversation
Red: a repo job with no token fails today with "the job cannot read the vault" where it should read nothing, say so in one line, and go on. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…vault A repo job with no credential for the vault, as a pull request from a fork is, says so in one line and goes on with the logins, which need none. A deploy job and a run of on_push still fail, naming the credentials missing. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Red: with a token and no op on the PATH, the first read of the vault fails
with exit 127 ("op: command not found") where the step should install the
pinned version, verify it, and read with it. core/op.ts is a stub that
installs nothing; the fakes learn the download, unzip and gpg.
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
With a token and no op on the PATH, the step downloads the pinned version from 1Password into RUNNER_TEMP/op, checks the signature of op against the pinned signing key in a keyring of the job's own, checks its version, and reads the vault with it. A runner that has op is left as it is. The pin of the environment image is held equal to the constant by a test. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…ers/plx-248-setup-on-the-forges-runners
…ers/plx-248-setup-on-the-forges-runners
…e on each kind of runner Red: unzip extracts every member into the directory of the keyring, gpg is started with its configuration and agent, curl and the installed op see the vault's credentials, a missing tool ends as a bare spawn error, and the no-token line is no annotation and claims no cache on a slot that has its host's. Green at once, as guards: the primary key being the one compared, a verification naming no signature, a slot with Connect. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…no-token line is a warning and true on a slot unzip takes op and op.sig by name into a directory of their own, the keyring is made and the key imported before the zip is opened, gpg runs with --no-options and --no-autostart, curl is https-only with retries, none of them sees OP_*, and a missing tool is named. The pin's comment no longer promises an update bot pull request; a person moves both values. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
The slot's no-token line holds also where the host's servers do not answer. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
…ers/plx-248-setup-on-the-forges-runners
plx-ci setup asks op --version before it installs one; the stand-in answered every call but read with an error, so setup took the runner for one without op and downloaded the vendor's. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
davidjalbers
deleted the
davidjalbers/plx-248-setup-on-the-forges-runners
branch
December 3, 2026 03:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PLX-248:
plx-ci setupon the forge's own runners, which carry noopand give a pull request from a fork no secrets. Decision § 8.4.Two cases
A job handed no credential for the vault (no Connect server on the runner, no
OP_SERVICE_ACCOUNT_TOKEN).A repo job reads nothing from the vault and says so in one line, a
::warning::annotation, so that a pull request of the repo itself whose secret is unset or misnamed does not go green unnoticed:no token for the vault: reading nothing from it; the job runs without the server-actions key and ..., the rest depending on the runner:GITHUB_TOKEN's, no vaultsetupprints... without the remote cache... with the remote cache only where the cache servers of this runner's host answerwithout a trusted remote cache: the job is not on the overlay..., handsPLX_TURBO_TRUSTED=localturbowuses it); does not answer:without a trusted remote cache: the trusted server does not answer..., handslocalA fork's pull request on a slot is not decided here: a slot carries credentials no workflow hands out (Connect, the trusted cache token), so today a fork's code on a
byomrepo's slot runs with them. I added no refusal; the question is with the maintainer.The steps after
setup, on a forge runner:test,build,e2erun (the build without a key; Next 16.4.6 treats an emptyNEXT_SERVER_ACTIONS_ENCRYPTION_KEYas unset, per the review); no image is pushed inon_commitandon_pr.A deploy job with no credential fails, as before, in the line that names both ways (
OP_CONNECT_HOSTandOP_CONNECT_TOKEN,OP_SERVICE_ACCOUNT_TOKEN).A repo job of the workflow
on_pushwith no credential fails the same way, withon_push publishes the repo's images and cannot run without the vaultin front: its images carry the repo's one key (§ 3.8). This is my reading of "where a step cannot work without a secret, fail with a clear line".A job with a credential on a runner without
op.core/op.tsasksop --version(without the vault's credentials). Where that works, the runner'sopis used and nothing is downloaded or written. Otherwise it installs the pinned version underRUNNER_TEMP/op(never the checkout), in three directories:gnupg(the keyring, 0700),download(the zip and the key),bin(what is unzipped). In order:curl --proto =https --retry 3the ziphttps://cache.agilebits.com/dist/1P/op2/pkg/v<version>/op_linux_<arch>_v<version>.zip(<arch>after the machine: amd64, arm64, arm, 386) and 1Password's key filehttps://downloads.1password.com/linux/keys/1password.asc.gpg --no-options --no-autostart --homedir <gnupg> --batch --importthe key, before the zip is opened.unzip -qo op.zip op op.sig -d <bin>: only those two members, into a directory that holds nothing else.gpg --no-options --no-autostart ... --status-fd 1 --verify op.sig op. The signature's primary key (last field ofVALIDSIG) must be3FEF9748469ADBE15DA7CA80AC2D62742012EA22. A signature that does not verify, one by another key, or output naming none fails the job in one line and runs nothing; the vault is not read.chmod 700, thenop --versionmust say the pinned version.curl,unzip,gpg,mkdir,chmodand the installedop --versionare started without anyOP_*variable. A missingcurl,unziporgpgfails withcannot install op: <tool> is not on this runner.--no-optionsmakes gpg read no configuration file (a plantedgpg.confnaming anagent-programwas the way a zip could run code, as the review showed).--no-autostart(gpg's manual: "do not start the gpg-agent or the dirmngr if it has not yet been started and its service is required") means gpg starts no daemon; importing a public key and verifying a signature need none. With gpg 2.4.9 here it printsno gpg-agent running in this sessionon import, exits 0, and leaves no agent behind. I did not check the flags on the gpg ofubuntu-latest(not on this machine).How
opis verified1Password documents the Linux manual install in "Get started with 1Password CLI" (https://developer.1password.com/docs/cli/get-started/, now served from https://www.1password.dev/cli/get-started/): the zip from
cache.agilebits.com/dist/1P/op2/pkg/..., thengpg --keyserver keyserver.ubuntu.com --receive-keys 3FEF9748469ADBE15DA7CA80AC2D62742012EA22andgpg --verify op.sig op. The page names no checksum and no provenance attestation, so the signature is the only documented verification. The same page's apt instructions fetch the key fromdownloads.1password.com/linux/keys/1password.asc; the fingerprint of that file is the one above, and the roleactions_runnersalready ships it (1password-signing-key.asc). I fetch it from 1Password's site and compare the signing fingerprint with the pinned one instead of trusting the keyserver or the file. That the zip holdsop.sigthe page implies and does not state; I looked (below).Where the version is, and what moves it
OP_VERSIONinpackages/cli-ci/src/core/op.tsis the one statement in code, 2.42.0. The environment image pins the same version in itsmise.toml(aqua:1password/cli; a slot installs nothing per job). The update bot cannot look that package up (the dashboard issue of this repo says so), so a person moves the two together, and a test holds them equal. I did not change the bot's configuration.Tested
Test first, red before code, commits in order:
0bee9dftests for a job without a token: red because the job failed withthe job cannot read the vault(exit 1) instead of reading nothing. The deploy and with-token tests were green at once, as guards.06cb8d6its code.432a151tests for a runner withoutop(the fakes learn--outputdownloads,unzip,gpg, anoOprunner): red because the first read of the vault failed withop: command not found, exit 127, where it should install. The test of the image pin was green at once, being a guard.9e4f7ceits code.ffc46f4a comment;dd0814emergesplain-pipeline-2.Second round, after the review (it found that the first install could run a member of the zip before verification, with the service account token in its environment):
f83bad7tests: red becauseunziptook every member into the keyring's directory,gpgran with its configuration and agent,curland the installedop --versionsawOP_*, a missing tool ended asspawn ... ENOENT, and the no-token line was no annotation and claimed no cache on a slot. The fakeunzipnow honours its arguments, and can hold a plantedgnupg/gpg.confand a../member. Green at once, as guards: that the primary key is the one compared (the fake prints a different signing subkey), that a verification naming no signature fails, the slot with Connect.7768ac9code, docs and the pin's comment.mise run test: exit 0, cli-ci 89 of 89.mise run e2enot run. Two existing tests changed in the first round: "with neither" now uses a deploy job, and theopcalls counted include the--versionprobe.No real download,
opor vault in a unit test. Outside the tests, in a scratch directory only, I ranopOfitself against the real download with a PATH holding noop(again after the fix): it downloaded 2.42.0, gpg reported a good signature of the pinned key,op --versionsaid 2.42.0, no gpg-agent was left; a byte appended toopgaveBADSIG. No secret read.Not tried: a real forge runner or a real fork pull request; fork pull requests on slots; the flags on the gpg and unzip of
ubuntu-latest; what a hostile zip may hold beyond the planted configuration and path cases tested here; the update bot's lookup ofop(it fails today);GITHUB_TOKENof a fork reading private packages; ARM runners.Builds on #91, merged
"Runs without the remote cache" is #91's mechanism (
PLX_TURBO_TRUSTED=local, handed where the job is not on the overlay or no trusted server answers); this change adds none of its own.origin/plain-pipeline-2at4540eacis merged in; the conflicts were the two header renumberings ofcommands/setup.ts(one numbering now: 1 refuse, 2 credential or none and the install, 3 to 9 as before and #91's) and the header and theTOOLSfilter oftesting/job.ts(it keepswithoutandrealCurl). What a job without a token gets is the table above, which I ran on the merged code. A fork job on a forge runner prints two lines, the warning and #91's.Readings, for the maintainer to confirm
on_pushwithout a credential fails (above), rather than publishing images with Next's own key.op --versionfailing for any reason counts as "no op", and the job installs its own.without a trusted remote cache: ...), where § 8.4 says one.downloads.1password.com, authenticated by its fingerprint, not from a keyserver.--dry-runon a runner withoutop, the install is narrated and not done, and the reads then fail on the missingop.a deploy job reads the vaultinsetup.tsis unreachable; it is there for the type.What a consumer notices
A repo job on a forge runner now works with a service account token and no
op: one download of about 16 MB in the step. A pull request from a fork passessetupwith a warning and runs the verbs without key and remote cache. A slot withopin its image changes nothing for a job with a credential; for one without, see the table. Workflows need no change.What the compendium owes
approaches/delivery.md§ 8, "The vaults": a job with no credential reads nothing, andplx-ci setupinstalls the pinnedop, verified, where the runner has none.approaches/delivery.mdwhere it saysplx-ci setuphands the job both fixed tokens: only where the job has a credential.approaches/delivery.mdwhere it says the vault's CLI is in the environment image: and installed per job on the forge's runners.approaches/secrets.md"every job loads what it needs from the vault": the exception for a job with no credential.byom.I did not touch the compendium.
🤖 Generated with Claude Code