Repository navigation
ci(TC-887): resolve the w5 workspace with --locked using a policy-engine deploy key - #334
Merged
Merged
Conversation
…ine deploy key A w5-lockfile job resolves test/w5-policy-runtime-node-e2e with --locked once a read-only deploy key for TinyCloudLabs/policy-engine is in the POLICY_ENGINE_DEPLOY_KEY secret; without it the job skips with a notice. The key lives in an ssh-agent for the cargo step only, checkout keeps no credentials, GitHub's host key is pinned and only that repository's URL is rewritten. The email-claim verifier fixture becomes its own workspace, so cargo loads it standalone; a root exclude cannot reach it under the tinycloud-node-server member.
Contributor
Author
|
APPROVE: see TC-887 (reviewed head effc805) |
Unset the deploy key after ssh-add (cargo can run an in-tree rustc wrapper), let ssh-add report a malformed key, drop the unpinned toolchain action (rustup installs the rust-toolchain.toml pin), scope the SSH rewrite to the cargo process and anchor it: every lockfile source under the policy-engine prefix must be exactly that repository. Document when the missing-secret skip should become a failure.
Contributor
Author
|
APPROVE: see TC-887 (reviewed head f8cfc3c) |
samgbafa
marked this pull request as ready for review
October 17, 2026 10:28
The fixture is pinned by hash (pinned_email_claim_manifest_runs_all_negative_rows); nothing needs it to load standalone.
Contributor
Author
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.
Part of TC-887 (encryption at rest): CI coverage for the separate w5 workspace's lockfile. Follows #332. Inert until a deploy key is added.
What changed
w5-lockfile(.github/workflows/rust.yml): runscargo metadata --locked --manifest-path test/w5-policy-runtime-node-e2e/Cargo.toml, the same real cargo resolve the other workspaces get. w5 depends on the privateTinyCloudLabs/policy-engineby git, so the job needs a read-only deploy key for that repository in thePOLICY_ENGINE_DEPLOY_KEYsecret.::noticeand passes.permissions: contents: read. Checkout usespersist-credentials: false.ssh-add -from the step's env into anssh-agentthat lives only for the cargo step and is killed on exit. ThenPOLICY_ENGINE_DEPLOY_KEYis unset before cargo runs, because cargo can run an in-treebuild.rustc-wrapper. A malformed key failsssh-addwith its message. The key never appears on argv or in output.known_hosts, not scanned.url.<ssh>.insteadOf) is set throughGIT_CONFIG_COUNT/KEY/VALUEfor the cargo process only. It's anchored: before running, the step fails if any lockfile source shares thehttps://github.com/TinyCloudLabs/policy-engineprefix but is a different URL. The lockfile keeps its https source, so--lockedis unaffected.rust-toolchain.tomlpin (1.97.1) when cargo first runs.tinycloud-node-server/tests/fixtures/email-claim-v1/ruststandalone, because it sits under thetinycloud-node-servermember and isn't its own workspace. A rootexcludecan't reach it there. The fixture's manifest is frozen by hash (pinned_email_claim_manifest_runs_all_negative_rows), so it stays as is; nothing needs to load it standalone today.Needs (admin, not in this PR)
A read-only deploy key on
TinyCloudLabs/policy-engine, with its private half stored as thePOLICY_ENGINE_DEPLOY_KEYActions secret on this repository.How it's tested
contents: readand the steps above.ssh-keyscan -t ed25519 github.comtoday.…/policy-engine-evilsource. With the sameGIT_CONFIG_*env,git ls-remote --get-url https://github.com/TinyCloudLabs/policy-engineresolves tossh://git@github.com/TinyCloudLabs/policy-engine.lockfilesjob runs for the other workspaces, and it passes locally for w5 with repository access.