Repository navigation
ci: Run optional E2E tests in a separate workflow - #25548
andreiborza wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| run: ${{ matrix.build-command || 'pnpm test:build' }} | ||
|
|
||
| - wait: [install-playwright] | ||
|
|
||
| - name: Run E2E test | ||
| working-directory: ${{ runner.temp }}/test-application | ||
| timeout-minutes: 10 | ||
| run: ${{ matrix.assert-command || 'pnpm test:assert' }} |
There was a problem hiding this comment.
workflow_dispatch matrix inputs run arbitrary shell with E2E secrets
Free-form inputs.matrix values are expanded directly into run: steps while Cloudflare, Sentry, OpenRouter, and OpenAI secrets are present, so a workflow_dispatch caller can execute arbitrary commands and exfiltrate those credentials. Keep build/assert as fixed commands (or an allowlist) and pass only safe matrix fields via env.
Evidence
on.workflow_dispatch.inputs.matrixis a required free-form string and becomes the job matrix viafromJson(inputs.matrix || ...)at line 77.Build E2E appandRun E2E testuserun: ${{ matrix.build-command || 'pnpm test:build' }}andrun: ${{ matrix.assert-command || 'pnpm test:assert' }}, so matrix fields are interpolated into the shell script before execution.- The same job exports
secrets.CLOUDFLARE_API_TOKEN,secrets.E2E_TEST_AUTH_TOKEN,secrets.E2E_OPENROUTER_API_KEY, and conditionallysecrets.E2E_OPENAI_DECISIONS_API_KEYinto the process environment. matrix.test-applicationis also interpolated into theci:copy-to-temprun:step, giving a second expression-injection sink from the same caller-controlled matrix.
Identified by Warden · security-review · MFJ-W8L
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 failing, 62 successful. See the run.
Successful checks
|
| run: ${{ matrix.build-command || 'pnpm test:build' }} | ||
|
|
||
| - wait: [install-playwright] | ||
| - name: Trigger optional E2E tests |
There was a problem hiding this comment.
no strong feeling, but maybe this could be a JS-based in-repo action (like size limit etc)? would maybe be a bit easier to read/adjust in the future?
What
Optional E2E tests now run in their own workflow. The build workflow starts it, waits for it to finish, and reports failures in one PR comment.
Why
Failed optional tests made the PR show a red cross, even though the PR could be merged.