Skip to content

Commit

Permalink
Avoid running untrusted input as shell commands in the GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
eason9487 authored May 9, 2024
1 parent db0298d commit 12335a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/php-hook-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
source-directories: includes/,woocommerce-google-analytics-integration.php

- name: Commit hook documentation
env:
HEAD_REF: ${{ github.head_ref }}
shell: bash
# Use the github-actions bot account to commit.
# https://api.github.com/users/github-actions%5Bbot%5D
Expand All @@ -43,6 +45,6 @@ jobs:
echo "*No documentation changes to commit.*" >> $GITHUB_STEP_SUMMARY
else
echo "*Committing documentation changes.*" >> $GITHUB_STEP_SUMMARY
git commit -q -m "Update hooks documentation from ${{ github.head_ref }} branch."
git commit -q -m "Update hooks documentation from ${HEAD_REF} branch."
git push
fi

0 comments on commit 12335a7

Please sign in to comment.