Skip to content

Commit

Permalink
Problem: minor security issue in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jul 8, 2024
1 parent 61974a9 commit 42b1ce2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ jobs:
- name: Get Comment PR informations
id: pr_data
if: github.event_name == 'issue_comment'
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
echo "repo_name=${{ fromJson(steps.request.outputs.data).head.repo.full_name }}" >> $GITHUB_OUTPUT
comment_hash=`echo ${{ github.event.comment.body }} | cut -d' ' -f2` # get commit hash if any
comment_hash=`echo $COMMENT_BODY | cut -d' ' -f2` # get commit hash if any
if [[ "${comment_hash}" == "/runsim" ]]; then
# use default head ref
echo "ref=${{ fromJson(steps.request.outputs.data).head.ref }}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 42b1ce2

Please sign in to comment.