Repository navigation
ci: run hosted E2E cases against a deployed profile - #139
Conversation
✅ Cyclops Security Review: safe to merge✅ Reviewed 061bd79 (latest) · Coverage: full · no open findings · report |
There was a problem hiding this comment.
Beyond the inline findings, I checked the dispatch inputs for script injection in the secret-bearing job. None found: profile and group reach bash only through env: and a quoted argument array, and profile has to match a path listed by pnpm profiles before the e2e job starts. I also checked that validate-only runs get an empty DEPLOYER_PRIVATE_KEY, and they do.
Extended reasoning...
The change adds a manual, main-only workflow (.github/workflows/hosted-e2e.yml) that runs hosted E2E cases with a release environment's deployer key and RPC secrets. It also adds a vitest test for that workflow and updates the docs. Inputs are never interpolated directly into run scripts, and the unknown-profile path is refused before the secret-bearing job runs. The inline findings cover the remaining issues found.
Findings marked 🟡 are optional suggestions and need no follow-up push.
There was a problem hiding this comment.
Both points from my earlier review are fixed in 061bd79, and I found no new bugs. A human should still look, because this new workflow gives contributor-dispatched runs on main the funded DEPLOYER_PRIVATE_KEY from the release environment.
What was reviewed:
- The
e2ejob no longer getsTEMPO_RPC_*, so failure text in the artifact and summary can't carry a private RPC URL. The docs say why. - Profile normalization now uses node's
path.relativeinstead of GNUrealpath -m, so the resolve test runs on macOS. - The deployer key is withheld when
validate-onlyis set, the queue matches the deploy and release workflows, the CLI arguments are built as an array (no word splitting ofgroup), and the summary's jq escapes|and newlines. - Not done: I didn't run actionlint,
pnpm checkor the new vitest file in this review.
Extended reasoning...
The change adds a manual main-only workflow, .github/workflows/hosted-e2e.yml. It runs pnpm e2e:profile in the factory-release-<network> environment with DEPLOYER_PRIVATE_KEY and TEMPO_API_KEY. The PR also adds an actionlint ignore, a vitest file that runs the workflow's bash steps, and doc updates. The security surface is secret exposure: the job holds a funded deployer key, and that environment has no required reviewer, so dispatching the workflow is its approval. The follow-up commit addressed both of my earlier inline findings (RPC credential leak, GNU-only realpath). I deferred instead of approving because this is a new trust-model decision in a credentialed release environment, not a mechanical change.
Adds a manual
Hosted E2Eworkflow (hosted-e2e.yml) that runspnpm e2e:profileagainst one committed, deployed profile frommain. No workflow ran these cases before.What it does
profileinput and finds it inpnpm profiles --network <network>for each hosted network. Anything that is not a committed profile on a hosted network is refused.pnpm e2e:profile <profile>(plus--groupor--validate-only) in that network'sfactory-release-<network>environment, in thehosted-contracts-<network>concurrency queue it shares with Deploy and the release workflows, so the deployer key never sends from two jobs at once.mainonly, like the release workflows.e2e/.results/as an artifact.Inputs
profile(defaultprofiles/e2e-moderato/profile.json)group: optional; passed as--group(the CLI refuses it with--validate-only)validate-only(default false): only the read-only validationSecrets and environment
From
factory-release-<network>:DEPLOYER_PRIVATE_KEY(operator and actor fee top-ups; withheld whenvalidate-onlyis set), optionalTEMPO_RPC_URL/TEMPO_RPC_USERNAME/TEMPO_RPC_PASSWORD(falls back to the public RPC).TEMPO_API_KEYfor Zone access, as the benchmark workflow uses.Validation
actionlint(with the samequeueignore the other queued workflows carry)deployments/core/hosted-e2e-workflow.test.ts: dispatch-only,main-only, environment and queue, deployer key withheld from validate-only, network list matches the hosted networks; runs the resolve step's script (maps each committed profile to its network, normalizes./paths, refuses a missing profile and a non-profile path) and the summary step's script against a sample resultpnpm check(lint andvp fmt --checkover.githubanddocs),tsc --noEmitindeployments,pnpm --filter @tempoxyz/contracts test --run docs deploy-workflow hosted-e2e-workflow,git diff --checkDocumented in
docs/deployment/e2e-environments.md(Profile acceptance) and the CI table and secrets list indocs/development/README.md.Not dispatched: it runs only from
main.