Skip to content

Commit 2e929d6

Browse files
authored
Merge pull request #159 from AppsFlyerSDK/fix/command-injection-workflow
fix: prevent command injection in prepare-for-release workflow
2 parents 5f3af56 + fe5f9a7 commit 2e929d6

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/prepare-for-release-workflow.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ jobs:
2121
with:
2222
repo-token: ${{ secrets.CI_GITHUB_TOKEN }}
2323
- name: Determine release tag and release branch
24+
env:
25+
BRANCH_NAME: ${{ steps.vars.outputs.branch }}
2426
run: |
25-
TAG=$(echo "${{ steps.vars.outputs.branch }}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
26-
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV
27+
TAG=$(echo "${BRANCH_NAME}" | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
28+
echo "PLUGIN_VERSION=$TAG" >> $GITHUB_ENV
2729
- name: run script
28-
run: bash .github/bash_scripts/release.sh ${{env.PLUGIN_VERSION}}
30+
run: bash .github/bash_scripts/release.sh ${{env.PLUGIN_VERSION}}
2931
- name: Commit and Push
32+
env:
33+
BRANCH_NAME: ${{ steps.vars.outputs.branch }}
3034
run : |
3135
git add .
3236
git commit -m"Commited from github action - prepaing the repo for production."
33-
git push origin HEAD:${{ steps.vars.outputs.branch }} --force
37+
git push origin HEAD:${BRANCH_NAME} --force

0 commit comments

Comments
 (0)