Skip to content

Commit cae5352

Browse files
authored
Merge pull request #550 from medizininformatik-initiative/feature/549-pin-dependencies-in-workflow-files-to-specific-hash
#549 - Pin dependencies in workflow files to specific hash
2 parents 233dfc4 + c3dc4bf commit cae5352

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
permissions:
2222
security-events: write
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

2626
- name: Docker Meta
27-
uses: docker/metadata-action@v5
27+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
2828
with:
2929
images: |
3030
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@@ -44,24 +44,24 @@ jobs:
4444
org.opencontainers.image.description=The backend for the dataportal, including feasibility query execution as well as data selection and extraction.
4545
4646
- name: Set up JDK 22
47-
uses: actions/setup-java@v4
47+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
4848
with:
4949
distribution: 'temurin'
5050
java-version: 22
5151

5252
- name: Cache Local Maven Repo
53-
uses: actions/cache@v4
53+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5454
with:
5555
path: ~/.m2/repository
5656
key: tests-maven-${{ hashFiles('pom.xml') }}
5757

58-
- uses: s4u/maven-settings-action@v3.0.0
58+
- uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0
5959
with:
6060
servers: |
6161
[{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
6262
6363
- name: Initialize CodeQL
64-
uses: github/codeql-action/init@v3
64+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
6565
with:
6666
languages: java
6767
queries: security-and-quality
@@ -70,33 +70,33 @@ jobs:
7070
run: mvn -Pdownload-ontology -B verify
7171

7272
- name: Upload coverage to Codecov
73-
uses: codecov/codecov-action@v4
73+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
7474
env:
7575
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7676
with:
7777
fail_ci_if_error: true
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v3
80+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
8181

8282
- name: Upload Dataportal Backend Jar
83-
uses: actions/upload-artifact@v4
83+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8484
with:
8585
name: backend-jar
8686
path: target/dataportalBackend.jar
8787

8888
- name: Set up Docker Buildx
89-
uses: docker/setup-buildx-action@v3
89+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
9090

9191
- name: Build and Export to Docker
92-
uses: docker/build-push-action@v6
92+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
9393
with:
9494
context: .
9595
tags: backend:latest
9696
outputs: type=docker,dest=/tmp/dataportalBackend.tar
9797

9898
- name: Upload Dataportal Backend Image
99-
uses: actions/upload-artifact@v4
99+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
100100
with:
101101
name: backend-image
102102
path: /tmp/dataportalBackend.tar
@@ -107,21 +107,21 @@ jobs:
107107
security-events: write
108108

109109
steps:
110-
- uses: actions/checkout@v4
110+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
111111

112-
- name: Set up JDK 21
113-
uses: actions/setup-java@v4
112+
- name: Set up JDK 22
113+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
114114
with:
115-
distribution: 'zulu'
116-
java-version: 21
115+
distribution: 'temurin'
116+
java-version: 22
117117

118118
- name: Cache Local Maven Repo
119-
uses: actions/cache@v4
119+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
120120
with:
121121
path: ~/.m2/repository
122122
key: security-scan-maven-${{ hashFiles('pom.xml') }}
123123

124-
- uses: s4u/maven-settings-action@v3.0.0
124+
- uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0
125125
with:
126126
servers: |
127127
[{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
@@ -130,14 +130,14 @@ jobs:
130130
run: mvn -Pdownload-ontology -B -DskipTests package
131131

132132
- name: Build and push Docker image
133-
uses: docker/build-push-action@v6
133+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
134134
with:
135135
context: .
136136
tags: security-scan-build:latest
137137
push: false
138138

139139
- name: Run Trivy Vulnerability Scanner
140-
uses: aquasecurity/trivy-action@master
140+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # v0.32.0
141141
with:
142142
image-ref: security-scan-build:latest
143143
format: sarif
@@ -149,7 +149,7 @@ jobs:
149149
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
150150

151151
- name: Upload Trivy Scan Results to GitHub Security Tab
152-
uses: github/codeql-action/upload-sarif@v3
152+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
153153
with:
154154
sarif_file: trivy-results.sarif
155155

@@ -165,16 +165,16 @@ jobs:
165165

166166
steps:
167167
- name: Check out Git repository
168-
uses: actions/checkout@v4
168+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
169169

170170
- name: Download Dataportal Backend Image
171-
uses: actions/download-artifact@v4
171+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
172172
with:
173173
name: backend-image
174174
path: /tmp
175175

176176
- name: Install jq
177-
uses: dcarbone/install-jq-action@v2.1.0
177+
uses: dcarbone/install-jq-action@b7ef57d46ece78760b4019dbc4080a1ba2a40b45 # v3.2.0
178178

179179
- name: Load Dataportal Backend Image
180180
run: docker load --input /tmp/dataportalBackend.tar
@@ -223,7 +223,7 @@ jobs:
223223

224224
- name: Dump docker logs on failure
225225
if: failure()
226-
uses: jwalton/gh-docker-logs@v2
226+
uses: jwalton/gh-docker-logs@2741064ab9d7af54b0b1ffb6076cf64c16f0220e # v2.2.2
227227

228228
release:
229229
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'pull_request') }}
@@ -236,34 +236,34 @@ jobs:
236236
contents: write
237237
packages: write
238238
steps:
239-
- uses: actions/checkout@v4
239+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
240240

241241
- name: Parse version
242-
uses: nowsprinting/check-version-format-action@v4
242+
uses: nowsprinting/check-version-format-action@c7180d5aa53d69af70c364c047482fc71e133f55 # v4.0.6
243243
id: version
244244
with:
245245
prefix: 'v'
246246

247247
- name: Report invalid version
248248
if: ${{ startsWith(github.ref, 'refs/tags/v') && steps.version.outputs.is_valid != 'true' }}
249-
uses: actions/github-script@v7
249+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
250250
with:
251251
script: |
252252
core.setFailed('Tag name "${{ github.ref_name }}" is not a valid semantic version!')
253253
254254
- name: Set up JDK 22
255-
uses: actions/setup-java@v4
255+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
256256
with:
257257
distribution: 'temurin'
258258
java-version: 22
259259

260260
- name: Cache Local Maven Repo
261-
uses: actions/cache@v4
261+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
262262
with:
263263
path: ~/.m2/repository
264264
key: release-maven-${{ hashFiles('pom.xml') }}
265265

266-
- uses: s4u/maven-settings-action@v3.0.0
266+
- uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0
267267
with:
268268
servers: |
269269
[{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}]
@@ -277,20 +277,20 @@ jobs:
277277
run: mvn -Pdownload-ontology -B -DskipTests package
278278

279279
- name: Login to GitHub Docker Registry
280-
uses: docker/login-action@v3
280+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
281281
with:
282282
registry: ghcr.io
283283
username: ${{ github.actor }}
284284
password: ${{ secrets.GITHUB_TOKEN }}
285285

286286
- name: Set up QEMU
287-
uses: docker/setup-qemu-action@v3
287+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
288288

289289
- name: Set up Docker Buildx
290-
uses: docker/setup-buildx-action@v3
290+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
291291

292292
- name: Build and push Docker image
293-
uses: docker/build-push-action@v6
293+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
294294
with:
295295
context: .
296296
platforms: linux/amd64,linux/arm64

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ jobs:
7373
# Upload the results to GitHub's code scanning dashboard (optional).
7474
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7575
- name: "Upload to code-scanning"
76-
uses: github/codeql-action/upload-sarif@v3
76+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
7777
with:
7878
sarif_file: results.sarif

0 commit comments

Comments
 (0)