Skip to content

Commit

Permalink
fix: Use an intermediate env variable in GH workflow (#12905)
Browse files Browse the repository at this point in the history
> For inline scripts, the preferred approach to handling untrusted input is to set the value of the expression to an intermediate environment variable.

Source: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum authored May 7, 2024
1 parent a772ed7 commit 772616c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/operator-check-prepare-release-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
steps:
- name: Extract release version
id: pr_semver
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
SEMVER=$(echo "$PR_TITLE" | sed -n 's/^chore( operator): community release \([0-9]\+\.[0-9]\+\.[0-9]\+\)$/\1/p')
echo "semver=$SEMVER" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 772616c

Please sign in to comment.