From 6df6f453c897cc233255f4ee8a592114f3996dd9 Mon Sep 17 00:00:00 2001 From: Thomas Pierce Date: Tue, 10 Feb 2026 14:14:12 -0800 Subject: [PATCH] fix: prevent script injection by using env vars instead of github.event --- .github/workflows/post-release-version-bump.yml | 8 ++++---- .github/workflows/pre-release-prepare.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/post-release-version-bump.yml b/.github/workflows/post-release-version-bump.yml index ea47b237c..4c9c456b1 100644 --- a/.github/workflows/post-release-version-bump.yml +++ b/.github/workflows/post-release-version-bump.yml @@ -28,8 +28,8 @@ jobs: - name: Extract Major.Minor Version and setup Env variable run: | - echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV - echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV + echo "VERSION=${{ env.VERSION }}" >> $GITHUB_ENV + echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV - name: Get current major.minor version from main branch id: get_version @@ -86,8 +86,8 @@ jobs: - name: Extract Major.Minor Version and setup Env variable run: | - echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV - echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV + echo "VERSION=${{ env.VERSION }}" >> $GITHUB_ENV + echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV - name: Determine release branch and checkout run: | diff --git a/.github/workflows/pre-release-prepare.yml b/.github/workflows/pre-release-prepare.yml index e5060be28..74f21a52f 100644 --- a/.github/workflows/pre-release-prepare.yml +++ b/.github/workflows/pre-release-prepare.yml @@ -53,8 +53,8 @@ jobs: - name: Extract Major.Minor Version and setup Env variable run: | - echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV - echo "MAJOR_MINOR=$(echo ${{ github.event.inputs.version }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV + echo "VERSION=${{ env.VERSION }}" >> $GITHUB_ENV + echo "MAJOR_MINOR=$(echo ${{ env.VERSION }} | sed -E 's/([0-9]+\.[0-9]+)\.[0-9]+/\1/')" >> $GITHUB_ENV - name: Create branches run: |