ci(security): harden workflow steps against template-injection#68431
ci(security): harden workflow steps against template-injection#68431
Conversation
zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script.
Files changed:
- control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site)
- docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites)
- openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site)
Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass.
Refs #68428. Complements #66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
Greptile SummaryMechanical template-injection hardening across three CI workflow files: hoists all dynamic Confidence Score: 5/5Safe to merge — changes are purely mechanical, no behavioral impact. All 8 template-injection sites are correctly hoisted into env: blocks with proper shell variable references. The substitutions preserve exact semantics, and the docker digest quoting is a minor improvement over the prior unquoted inline interpolation. No logic, data, or security regressions introduced. No files require special attention. Reviews (1): Last reviewed commit: "ci(security): harden workflow steps agai..." | Re-trigger Greptile |
|
Self-review note: GitHub blocks self-approve. Verified locally that zizmor on the three modified files now reports no findings, and pnpm format:check + pnpm lint are both clean. Mechanical env-var substitution per the canonical pattern — no runtime behaviour change. Ready for a second maintainer approval or admin merge. |
…law#68431) zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script. Files changed: - control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site) - docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites) - openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site) Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass. Refs openclaw#68428. Complements openclaw#66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
…law#68431) zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script. Files changed: - control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site) - docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites) - openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site) Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass. Refs openclaw#68428. Complements openclaw#66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
…law#68431) zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script. Files changed: - control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site) - docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites) - openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site) Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass. Refs openclaw#68428. Complements openclaw#66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
…law#68431) zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script. Files changed: - control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site) - docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites) - openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site) Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass. Refs openclaw#68428. Complements openclaw#66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
…law#68431) zizmor v1.24.1 reports 8 template-injection findings across three workflow files where GitHub Actions ${{ ... }} expressions are interpolated directly into shell run: blocks. Applies the canonical fix pattern: hoist every dynamic value into a step-level env: block and reference it as a shell variable ("${VAR}") from the script. Files changed: - control-ui-locale-refresh.yml: move matrix.locale into env as LOCALE (1 site) - docker-release.yml: hoist steps.tags.outputs.{value,slim} plus the four needs.build-{amd64,arm64}.outputs.{digest,slim-digest} values into env for both manifest-creation steps (6 sites) - openclaw-npm-release.yml: hoist steps.publish_tarball.outputs.path into env as PUBLISH_TARBALL_PATH in the Publish step (1 site) Verified locally with zizmor --persona regular on the three files: 'No findings to report. Good job!'. pnpm format:check and pnpm lint pass. Refs openclaw#68428. Complements openclaw#66884, which covers the remaining 12 sites in openclaw-cross-os-release-checks-reusable.yml.
Summary
Harden three CI workflow files against
template-injectionfindings reported by zizmor (v1.24.1), using the canonical fix pattern: hoist every dynamic${{ … }}expression out of therun:block into a step-levelenv:dictionary, then reference it as"${VAR}"from the script.Covers the 8 template-injection sites that are not addressed by #66884 (which handles the remaining 12 sites in
openclaw-cross-os-release-checks-reusable.yml).Files and sites fixed
.github/workflows/control-ui-locale-refresh.yml(1 site)matrix.localelifted into env asLOCALE..github/workflows/docker-release.yml(6 sites)Both
Create and push default manifestandCreate and push slim manifeststeps in thecreate-manifestjob:steps.tags.outputs.value→TAGSsteps.tags.outputs.slim→SLIM_TAGSneeds.build-amd64.outputs.digest→AMD64_DIGESTneeds.build-arm64.outputs.digest→ARM64_DIGESTneeds.build-amd64.outputs.slim-digest→AMD64_SLIM_DIGESTneeds.build-arm64.outputs.slim-digest→ARM64_SLIM_DIGEST.github/workflows/openclaw-npm-release.yml(1 site)steps.publish_tarball.outputs.pathlifted into env asPUBLISH_TARBALL_PATHin thePublishstep.Verification
pnpm format:check— clean across 12,852 files.pnpm lint— 0 warnings, 0 errors.yamlpackage.Behavioural impact
None. The substitution is mechanical — GitHub Actions expands the expressions into environment variables at the same evaluation point as before, and the shell reads them via
${VAR}instead of having them baked into the script at render time.Relationship to other PRs / issues
openclaw-cross-os-release-checks-reusable.yml. Together, fix(ci): harden release checks workflow inputs #66884 + this PR resolve all 22 findings in the tracking issue.openclaw-cross-os-release-checks-reusable.ymlplus an unrelated script refactor; recommended to rebase on main once fix(ci): harden release checks workflow inputs #66884 lands and keep only the script refactor.