Scrub runner event env in test harness #1

Merged
stephen merged 2 commits from fix/harness-event-path-scrub into main 2026-08-07 21:51:15 +00:00
Owner

What changed:

  • Scrubbed ambient runner GITHUB_* context from tests/run.sh child process environments before invoking the action or helper under test.
  • Scrubbed variables: GITHUB_EVENT_PATH, GITHUB_REPOSITORY, GITHUB_REF, GITHUB_REF_NAME, GITHUB_SHA, GITHUB_RUN_ID, GITHUB_RUN_NUMBER, GITHUB_ACTIONS, GITHUB_WORKSPACE, GITHUB_OUTPUT, GITHUB_STATE, GITHUB_STEP_SUMMARY, GITHUB_PATH, GITHUB_ENV.
  • Harness-owned values are deliberately set back where needed, for example fixture GITHUB_OUTPUT/GITHUB_STATE/GITHUB_PATH/GITHUB_ENV files, GITHUB_WORKSPACE for cache-key tests, and repo/ref/sha/run metadata fixtures.

Why:

  • A real runner can export GITHUB_EVENT_PATH and other GITHUB_* values. The harness should not let those ambient values override its fixtures.

Verification:

  • Preventative: the leaked-event run and the normal bash tests/run.sh run were green before and after this change; no behaviour change was observed today because this action does not currently depend on context.payload.
What changed: - Scrubbed ambient runner GITHUB_* context from tests/run.sh child process environments before invoking the action or helper under test. - Scrubbed variables: GITHUB_EVENT_PATH, GITHUB_REPOSITORY, GITHUB_REF, GITHUB_REF_NAME, GITHUB_SHA, GITHUB_RUN_ID, GITHUB_RUN_NUMBER, GITHUB_ACTIONS, GITHUB_WORKSPACE, GITHUB_OUTPUT, GITHUB_STATE, GITHUB_STEP_SUMMARY, GITHUB_PATH, GITHUB_ENV. - Harness-owned values are deliberately set back where needed, for example fixture GITHUB_OUTPUT/GITHUB_STATE/GITHUB_PATH/GITHUB_ENV files, GITHUB_WORKSPACE for cache-key tests, and repo/ref/sha/run metadata fixtures. Why: - A real runner can export GITHUB_EVENT_PATH and other GITHUB_* values. The harness should not let those ambient values override its fixtures. Verification: - Preventative: the leaked-event run and the normal bash tests/run.sh run were green before and after this change; no behaviour change was observed today because this action does not currently depend on context.payload.
Scrub runner event env in test harness
Some checks failed
test / unit (pull_request) Successful in 3s
test / install (1.22.0) (pull_request) Failing after 7s
test / install (stable) (pull_request) Failing after 7s
test / version-file-and-cache (pull_request) Failing after 7s
7ecab4a279
Fix Go installer checksum extraction
Some checks failed
test / unit (pull_request) Successful in 20s
test / install (1.22.0) (pull_request) Successful in 27s
test / version-file-and-cache (pull_request) Failing after 7s
test / install (stable) (pull_request) Successful in 29s
3c32621512
stephen force-pushed fix/harness-event-path-scrub from 3c32621512
Some checks failed
test / unit (pull_request) Successful in 20s
test / install (1.22.0) (pull_request) Successful in 27s
test / version-file-and-cache (pull_request) Failing after 7s
test / install (stable) (pull_request) Successful in 29s
to 19ee1ef92c
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.0) (pull_request) Failing after 5s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Successful in 14s
2026-08-07 21:21:34 +00:00
Compare
stephen force-pushed fix/harness-event-path-scrub from 19ee1ef92c
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.0) (pull_request) Failing after 5s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Successful in 14s
to 97b1451df1
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.0) (pull_request) Failing after 5s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Has been skipped
2026-08-07 21:23:34 +00:00
Compare
stephen force-pushed fix/harness-event-path-scrub from 97b1451df1
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.0) (pull_request) Failing after 5s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Has been skipped
to bb67188030
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.12) (pull_request) Successful in 9s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Failing after 5s
2026-08-07 21:26:03 +00:00
Compare
stephen force-pushed fix/harness-event-path-scrub from bb67188030
Some checks failed
test / unit (pull_request) Successful in 4s
test / install (1.22.12) (pull_request) Successful in 9s
test / install (stable) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Failing after 5s
to 6bee837130
Some checks failed
test / unit (pull_request) Successful in 3s
test / install (stable) (pull_request) Failing after 6s
test / install (1.22.12) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Has been skipped
2026-08-07 21:28:39 +00:00
Compare
stephen force-pushed fix/harness-event-path-scrub from 6bee837130
Some checks failed
test / unit (pull_request) Successful in 3s
test / install (stable) (pull_request) Failing after 6s
test / install (1.22.12) (pull_request) Successful in 10s
test / version-file-and-cache (pull_request) Has been skipped
to 3161b98c27
Some checks failed
test / unit (pull_request) Successful in 3s
test / install (1.22.12) (pull_request) Successful in 9s
test / version-file-and-cache (pull_request) Failing after 5s
2026-08-07 21:31:07 +00:00
Compare
stephen force-pushed fix/harness-event-path-scrub from 3161b98c27
Some checks failed
test / unit (pull_request) Successful in 3s
test / install (1.22.12) (pull_request) Successful in 9s
test / version-file-and-cache (pull_request) Failing after 5s
to 669de38e0d
All checks were successful
test / unit (pull_request) Successful in 4s
test / install (1.22.12) (pull_request) Successful in 9s
test / version-file-and-cache (pull_request) Successful in 4s
2026-08-07 21:33:41 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
fjord/setup-go-action!1
No description provided.