Skip to content

ci: fix tarball workflow β€” real build scripts + parametrized notes#5

Merged
StevenMend merged 1 commit into
mainfrom
steven/fix-tarball-workflow
Jul 24, 2026
Merged

ci: fix tarball workflow β€” real build scripts + parametrized notes#5
StevenMend merged 1 commit into
mainfrom
steven/fix-tarball-workflow

Conversation

@StevenMend

Copy link
Copy Markdown
Member

The cut-dojo-tarball.yml one-shot referenced scripts/build-all.mjs, which does not exist on main β€” dispatch run 30116666722 failed on that step. The fork builds with pnpm build + pnpm ui:build; notes are now a dispatch input instead of a hardcoded old fix line.

Created by Claude Code on behalf of @StevenMendez

πŸ€– Generated with Claude Code

The one-shot release workflow referenced scripts/build-all.mjs, which does
not exist (run 30116666722 failed on it); the fork builds with pnpm build
+ pnpm ui:build. Release notes were also hardcoded to an old fix β€” now a
dispatch input.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@StevenMend
StevenMend merged commit 93919c3 into main Jul 24, 2026
6 of 9 checks passed

@dojo-code-reviewer dojo-code-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ”΄ Changes Requested

Changes requested β€” 1 blocker. Confidence: 1.00/5.00.

Walkthrough

⚠️ GOVERNANCE WARNING: This pull request targets the main branch directly. Per standard GitFlow practices, the development flow should go from feature branch β†’ develop branch β†’ main branch. This warning is informative only and does not influence the code quality/security review verdict.

Walkthrough

This PR fixes the cut-dojo-tarball.yml CI workflow by replacing obsolete and non-existent build scripts (scripts/build-all.mjs and scripts/ui.js) with standard, package-manager-configured build scripts (pnpm build and pnpm ui:build). It also introduces a notes parameter to the workflow_dispatch trigger, allowing the user to provide customized, one-line release notes during the workflow invocation instead of using a hardcoded message.

Files/Areas Reviewed

I reviewed the changed file .github/workflows/cut-dojo-tarball.yml and cross-referenced the root package.json to verify the existence and behavior of the build and ui:build scripts.

Safety Rationale

This PR is currently NOT safe to merge due to a severe security risk. Direct shell expansion of untrusted workflow_dispatch inputs (notes and tag) inside the run: block of the publish release step introduces an arbitrary command injection vulnerability.

Changes requested β€” 1 blocker.

πŸ”΄ P1 β€” Blockers

  • .github/workflows/cut-dojo-tarball.yml:45 β€” πŸ”΄ P1 (blocker) β€” Arbitrary shell command injection vulnerability detected. Directly expanding GitHub Actions expressions like ${{ inputs.notes }} and ${{ inputs.tag }} inside a run: block allows malicious input values (e.g., carrying quotes, semicolons, or shell metacharacters) to break out of the string context and execute arbitrary shell commands on the runner.

To resolve this safely, map the inputs to step-level environment variables (env:) and reference them inside the script using standard shell variable expansion ($VARIABLE).

Here is the secure implementation of this step:

      - name: Publish release
        env:
          GH_TOKEN: ${{ github.token }}
          RELEASE_TAG: ${{ inputs.tag }}
          RELEASE_NOTES: ${{ inputs.notes }}
          TGZ_FILE: ${{ steps.pack.outputs.tgz }}
        run: |
          gh release create "$RELEASE_TAG" "$TGZ_FILE" \
            --title "$RELEASE_TAG" \
            --notes "$RELEASE_NOTES"
          echo "SHA256 for the plugin Dockerfile ARG:"
          sha256sum "$TGZ_FILE"

[pass 1]


Total findings: 1 security (1 total)

gh release create "${{ inputs.tag }}" "${{ steps.pack.outputs.tgz }}" \
--title "${{ inputs.tag }}" \
--notes "AGT-051 β€” route retry steers through the system channel (nudge leak fix)."
--notes "${{ inputs.notes }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ”΄ P1 (blocker) β€” Arbitrary shell command injection vulnerability detected. Directly expanding GitHub Actions expressions like ${{ inputs.notes }} and ${{ inputs.tag }} inside a run: block allows malicious input values (e.g., carrying quotes, semicolons, or shell metacharacters) to break out of the string context and execute arbitrary shell commands on the runner.

To resolve this safely, map the inputs to step-level environment variables (env:) and reference them inside the script using standard shell variable expansion ($VARIABLE).

Here is the secure implementation of this step:

      - name: Publish release
        env:
          GH_TOKEN: ${{ github.token }}
          RELEASE_TAG: ${{ inputs.tag }}
          RELEASE_NOTES: ${{ inputs.notes }}
          TGZ_FILE: ${{ steps.pack.outputs.tgz }}
        run: |
          gh release create "$RELEASE_TAG" "$TGZ_FILE" \
            --title "$RELEASE_TAG" \
            --notes "$RELEASE_NOTES"
          echo "SHA256 for the plugin Dockerfile ARG:"
          sha256sum "$TGZ_FILE"

[pass 1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant