Skip to content

ci(security): harden workflow steps against template-injection#68431

Merged
visionik merged 1 commit intomainfrom
fix/zizmor-workflow-hardening-orphans
Apr 18, 2026
Merged

ci(security): harden workflow steps against template-injection#68431
visionik merged 1 commit intomainfrom
fix/zizmor-workflow-hardening-orphans

Conversation

@visionik
Copy link
Copy Markdown
Contributor

Summary

Harden three CI workflow files against template-injection findings reported by zizmor (v1.24.1), using the canonical fix pattern: hoist every dynamic ${{ … }} expression out of the run: block into a step-level env: 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)

  • Line 143 — matrix.locale lifted into env as LOCALE.

.github/workflows/docker-release.yml (6 sites)

Both Create and push default manifest and Create and push slim manifest steps in the create-manifest job:

  • steps.tags.outputs.valueTAGS
  • steps.tags.outputs.slimSLIM_TAGS
  • needs.build-amd64.outputs.digestAMD64_DIGEST
  • needs.build-arm64.outputs.digestARM64_DIGEST
  • needs.build-amd64.outputs.slim-digestAMD64_SLIM_DIGEST
  • needs.build-arm64.outputs.slim-digestARM64_SLIM_DIGEST

.github/workflows/openclaw-npm-release.yml (1 site)

  • Line 402 — steps.publish_tarball.outputs.path lifted into env as PUBLISH_TARBALL_PATH in the Publish step.

Verification

$ zizmor --persona regular \
    .github/workflows/control-ui-locale-refresh.yml \
    .github/workflows/docker-release.yml \
    .github/workflows/openclaw-npm-release.yml

No findings to report. Good job! (20 suppressed)
  • pnpm format:check — clean across 12,852 files.
  • pnpm lint — 0 warnings, 0 errors.
  • YAML parses cleanly for all three files via the project's own yaml package.

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

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.
@visionik visionik requested a review from a team as a code owner April 18, 2026 06:01
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Apr 18, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

Mechanical template-injection hardening across three CI workflow files: hoists all dynamic ${{ … }} expressions out of run: blocks into step-level env: dictionaries and replaces them with ${VAR} shell references, following the canonical pattern for eliminating GitHub Actions expression injection. All 8 sites addressed are correct and functionally equivalent to the originals.

Confidence Score: 5/5

Safe 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

@visionik
Copy link
Copy Markdown
Contributor Author

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.

@visionik visionik merged commit c778562 into main Apr 18, 2026
45 of 46 checks passed
@visionik visionik deleted the fix/zizmor-workflow-hardening-orphans branch April 18, 2026 06:04
ender-wiggin-ai pushed a commit to stroupaloop/openclaw that referenced this pull request Apr 18, 2026
…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.
Mquarmoc pushed a commit to Mquarmoc/openclaw that referenced this pull request Apr 20, 2026
…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.
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…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.
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant