diff --git a/.github/workflows/runner-full-stack-e2e.yml b/.github/workflows/runner-full-stack-e2e.yml index 5556752cbc4..d689e073068 100644 --- a/.github/workflows/runner-full-stack-e2e.yml +++ b/.github/workflows/runner-full-stack-e2e.yml @@ -363,7 +363,8 @@ jobs: daytona_image: name: Publish verified Daytona image needs: [authorize, target_lock, catalog] - runs-on: ubuntu-latest + # Keep image builds on the same authorized fleet as campaign execution. + runs-on: ${{ needs.authorize.outputs.test_runner }} timeout-minutes: 45 permissions: contents: read diff --git a/tests/runner-e2e/SECURITY.md b/tests/runner-e2e/SECURITY.md index e781d54fc63..e499f638d1e 100644 --- a/tests/runner-e2e/SECURITY.md +++ b/tests/runner-e2e/SECURITY.md @@ -98,7 +98,8 @@ the actor gate, environment branch restriction, and protected default branch. ## Runner fleet isolation -When `RUNNER_E2E_AWS_ENABLED=true`, paid matrix cells use the exact RunsOn fleet +When `RUNNER_E2E_AWS_ENABLED=true`, paid matrix cells, reusable runner builds, +and Daytona image builds use the exact RunsOn fleet selector `runs-on/fleet=paperclip-public-pr-x64/env=public-ci`, matching the AWS fleet selected by `pr-trusted.yml` only after its stable numeric-ID trust gate. Any other or missing toggle value falls back to the GitHub-hosted @@ -106,6 +107,10 @@ Any other or missing toggle value falls back to the GitHub-hosted between those two reviewed literal labels; it never evaluates a configured runner label. +Daytona image builds depend on successful campaign authorization and keep the +existing GHCR publication and signing permissions. They receive no provider +credentials and do not enter the `runner-e2e-paid` environment. + Keep both runner targets restricted to `paperclipai/paperclip` and workflows that independently authorize trusted source revisions. Never let a fork or untrusted pull-request workflow target them. The RunsOn fleet must launch a diff --git a/tests/runner-e2e/workflow-security.test.ts b/tests/runner-e2e/workflow-security.test.ts index 5e3fd4084f9..dc0ef205f85 100644 --- a/tests/runner-e2e/workflow-security.test.ts +++ b/tests/runner-e2e/workflow-security.test.ts @@ -200,6 +200,14 @@ describe("public repository paid workflow security", () => { fullStack.indexOf(" daytona_image:"), fullStack.indexOf(" build_runner_artifacts:"), ); + expect(daytonaImageJob).toMatch(buildRunnerNeeds); + expect(daytonaImageJob).toContain( + "runs-on: ${{ needs.authorize.outputs.test_runner }}", + ); + expect(daytonaImageJob).not.toContain("name: runner-e2e-paid"); + expect(daytonaImageJob).not.toMatch( + /(?:OPENAI|ANTHROPIC|OPENROUTER|DAYTONA|XAI)_API_KEY/, + ); expect(authorizeJob).toContain( "aws_runner='runs-on/fleet=paperclip-public-pr-x64/env=public-ci'", );