Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Extract version from release tag
if: github.event_name == 'release'
id: version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 11, 2026

Choose a reason for hiding this comment

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

P2: Directly embedding github.event.release.tag_name in an inline shell command allows shell-syntax injection during workflow execution.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/docker-build.yaml, line 39:

<comment>Directly embedding `github.event.release.tag_name` in an inline shell command allows shell-syntax injection during workflow execution.</comment>

<file context>
@@ -36,7 +36,7 @@ jobs:
         if: github.event_name == 'release'
         id: version
-        run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
+        run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
 
       - name: Build and push AMD64 Docker image (master)
</file context>
Suggested change
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: printf 'RELEASE_VERSION=%s\n' "$RELEASE_TAG" >> "$GITHUB_ENV"
Fix with Cubic


- name: Build and push AMD64 Docker image (master)
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- name: Extract version from release tag
if: github.event_name == 'release'
id: version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

- name: Build and push ARM64 Docker image (master)
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Extract version from release tag
if: github.event_name == 'release'
id: version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

- name: Create and push manifest for main
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
Expand Down