Skip to content

Commit b246f81

Browse files
committed
fix: Security: Fix 4 findings in GitHub Actions workflows
1 parent e4489c4 commit b246f81

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/commands.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
fetch-depth: 0
1818

1919
- name: Merge new commits from main
20+
env:
21+
GH_ACTOR: ${{ github.actor }}
2022
run: |
21-
git config --global user.name '${{ github.actor }}'
22-
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
23+
git config --global user.name '$GH_ACTOR'
24+
git config --global user.email '$GH_ACTOR@users.noreply.github.com'
2325
git merge -X theirs origin/main -m "Merge main into this branch"
2426
2527
- name: Rebuild the database
@@ -78,16 +80,20 @@ jobs:
7880
unzip -o /tmp/ext.zip -d ./extensions/${{ contains(github.event.issue.labels.*.name, '🔍 Reviewed extension') && 'reviewed' || 'community' }}
7981
8082
- name: Rebuild the database
83+
env:
84+
GH_ACTOR: ${{ github.actor }}
8185
run: |
8286
npm i
8387
echo 'BUILD_LOGS<<EOF' >> $GITHUB_ENV
8488
node scripts/generate-extensions-registry.js --disable-exit-code >> $GITHUB_ENV
8589
echo 'EOF' >> $GITHUB_ENV
8690
8791
- name: Setup git config
92+
env:
93+
GH_ACTOR: ${{ github.actor }}
8894
run: |
89-
git config --global user.name '${{ github.actor }}'
90-
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
95+
git config --global user.name '$GH_ACTOR'
96+
git config --global user.email '$GH_ACTOR@users.noreply.github.com'
9197
9298
- name: Check for changed file
9399
id: git-diff

0 commit comments

Comments
 (0)