Skip to content

Commit 2fc678c

Browse files
CBenoitCopilot
andcommitted
fix(ci): restrict CodSpeed walltime runner
Resolve the runner label from a repository-controlled variable so dispatchers cannot select hosted or sensitive self-hosted runners. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent f9cd47f commit 2fc678c

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

‎.github/workflows/codspeed.yml‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
pull_request:
88
types: [opened, synchronize, reopened]
99
workflow_dispatch:
10-
inputs:
11-
walltime_runner:
12-
description: Approved Linux runner label for wall-time measurements
13-
required: false
14-
type: string
1510

1611
permissions:
1712
contents: read
@@ -64,8 +59,8 @@ jobs:
6459

6560
walltime:
6661
name: CodSpeed walltime
67-
if: github.event_name == 'workflow_dispatch' && inputs.walltime_runner != '' && vars.CODSPEED_ENABLED == 'true'
68-
runs-on: ${{ inputs.walltime_runner }}
62+
if: github.event_name == 'workflow_dispatch' && vars.CODSPEED_ENABLED == 'true' && vars.CODSPEED_WALLTIME_RUNNER != ''
63+
runs-on: ${{ vars.CODSPEED_WALLTIME_RUNNER }}
6964

7065
steps:
7166
- uses: actions/checkout@v6

‎xtask/README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ Compilation and corpus fetching occur before the CodSpeed action and are exclude
127127

128128
The `CodSpeed` workflow runs simulation for pushes and pull requests only after maintainers set the `CODSPEED_ENABLED` repository variable to `true` and enable the repository in CodSpeed.
129129
It authenticates through GitHub OIDC and requires no repository secret for this public repository.
130-
The wall-time job is manual only and runs only when its dispatcher supplies a known, approved Linux runner label.
130+
The wall-time job is manual only and runs only when maintainers set the repository-controlled `CODSPEED_WALLTIME_RUNNER` variable to a known, approved Linux runner label.
131+
Dispatchers cannot select or override the wall-time runner.
132+
The job is skipped unless `CODSPEED_ENABLED` is `true` and `CODSPEED_WALLTIME_RUNNER` is nonempty.
131133
Use a dedicated stable runner for wall time; shared hosted runners are too noisy for performance decisions.
132134
The public capture cache uses the existing manifest-hash cache key and is digest-verified before use.
133135
Do not upload captures, decrypted payloads, TLS key material, screenshots, or generated replay output; CodSpeed receives measurements and may retain symbol-bearing profiles, not raw replay payloads.

0 commit comments

Comments
 (0)