You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
workflows: hoist matrix values to job-level env, drop expression substitution in run: blocks
Eli's review flagged `${{ matrix.arch }}` in a run: block as an injectable
pattern even though the matrix values are hardcoded and not truly exploitable.
Apply the pattern consistently across the whole workflow:
- Hoist PLATFORM, ARCH, BAZEL_ARCH, REPO to job-level env so each step can
reference them as shell variables ($ARCH etc.) rather than GitHub Actions
expressions (${{ matrix.arch }}). Job-level env evaluates matrix context
since the job is instantiated per matrix combination, so this DRYs up the
per-step env blocks.
- Rewrite every `run:` block to reference the job-level env vars. No more
`${{ ... }}` expressions inside shell scripts.
- Secret references (GITHUB_TOKEN) remain step-scoped per least-privilege.
- Minor cleanup: collapse three separate `echo ... >> $GITHUB_ENV` lines into
a single `{ ...; } >> "$GITHUB_ENV"` block.
Addresses Eli's inline comment on line 114 of the pre-hoist file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments