Skip to content

Commit e4dc113

Browse files
authored
Fix possible CWE-94 in a workflow
1 parent 3b69b67 commit e4dc113

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/backend.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ jobs:
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND }}
41+
HEAD_REF: ${{ github.head_ref }}
42+
BASE_REF: ${{ github.base_ref }}
4143
run: |
4244
mvn versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
4345
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
4446
-Dsonar.projectKey=com.provectus:kafka-ui_backend \
4547
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
46-
-Dsonar.pullrequest.branch=${{ github.head_ref }} \
47-
-Dsonar.pullrequest.base=${{ github.base_ref }}
48+
-Dsonar.pullrequest.branch=$HEAD_REF \
49+
-Dsonar.pullrequest.base=$BASE_REF
4850
- name: Build and analyze push master
4951
if: ${{ github.event_name == 'push' }}
5052
env:

0 commit comments

Comments
 (0)