Skip to content

Commit 7f16251

Browse files
build(deps): bump gradle/actions from 4.4.3 to 5.0.0 (#885)
* build(deps): bump gradle/actions from 4.4.3 to 5.0.0 Bumps [gradle/actions](https://github.com/gradle/actions) from 4.4.3 to 5.0.0. - [Release notes](https://github.com/gradle/actions/releases) - [Commits](gradle/actions@ed40850...4d9f0ba) --- updated-dependencies: - dependency-name: gradle/actions dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * ci(sonar): resolve githubactions:S7636 by using env vars for secrets Pass SONAR_KEY and SONAR_TOKEN through environment variables instead of direct expansion in run commands to prevent exposure in process lists and shell history --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Capt. Cutlass <5120290+ParanoidUser@users.noreply.github.com>
1 parent b3a0930 commit 7f16251

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
java-version: 17
5757

5858
- name: Setup Gradle
59-
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4
59+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v4
6060

6161
- name: Test project
6262
run: |
@@ -111,11 +111,14 @@ jobs:
111111
java-version: 17
112112

113113
- name: Setup Gradle
114-
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4
114+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v4
115115
with:
116116
add-job-summary-as-pr-comment: always
117117

118118
- name: Analyze code quality
119+
env:
120+
SONAR_KEY: ${{ secrets.SONAR_KEY }}
121+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
119122
run: |
120123
./gradlew sonar -x compileJava -x compileTestJava \
121124
--parallel \
@@ -126,7 +129,7 @@ jobs:
126129
--no-problems-report \
127130
-Pversion=${{ format('{0}+{1}', env.VERSION, github.RUN_NUMBER) }} \
128131
-Dsonar.host.url=https://sonarcloud.io \
129-
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
130-
-Dsonar.organization=${{ secrets.SONAR_KEY }} \
132+
-Dsonar.token=$SONAR_TOKEN \
133+
-Dsonar.organization=$SONAR_KEY \
131134
-Dsonar.qualitygate.wait=true \
132135
-Dsonar.gradle.skipCompile=true

.github/workflows/kata-pr-analysis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ jobs:
5757
java-version: 17
5858

5959
- name: Setup Gradle
60-
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4
60+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v4
6161
with:
6262
add-job-summary-as-pr-comment: always
6363

6464
- name: Analyze code quality
65+
env:
66+
SONAR_KEY: ${{ secrets.SONAR_KEY }}
67+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6568
run: |
6669
./gradlew ${{ steps.projects.outputs.tasks }} sonar -x processResources -x processTestResources\
6770
--parallel \
@@ -71,8 +74,8 @@ jobs:
7174
--scan \
7275
--no-problems-report \
7376
-Pversion=${{ format('{0}+{1}', env.VERSION, github.RUN_NUMBER) }} \
74-
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
75-
-Dsonar.organization=${{ secrets.SONAR_KEY }} \
77+
-Dsonar.token=$SONAR_TOKEN \
78+
-Dsonar.organization=$SONAR_KEY \
7679
-Dsonar.inclusions=${{ steps.projects.outputs.dirs }} \
7780
-Dsonar.qualitygate.wait=true \
7881
-Dsonar.gradle.skipCompile=true

0 commit comments

Comments
 (0)