Skip to content

Commit 83620dd

Browse files
committed
Pin GH Actions to commit sha
Related-to: harvester/harvester#10279 Signed-off-by: Tim Serong <tserong@suse.com>
1 parent c289402 commit 83620dd

5 files changed

Lines changed: 21 additions & 21 deletions

File tree

.github/workflows/basic-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- golang
2121
steps:
2222
- name: "Clone and check"
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2424
- name: "Run validations"
2525
run: |
2626
make validate
@@ -32,7 +32,7 @@ jobs:
3232
- golang
3333
steps:
3434
- name: "Clone and check"
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
3636
- name: "Build Integration Test Image and run Unit Tests"
3737
run: |
3838
BUILD_FOR_CI=true make
@@ -113,7 +113,7 @@ jobs:
113113
- golang
114114
steps:
115115
- name: "Clone and check"
116-
uses: actions/checkout@v3
116+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
117117
- name: "Build Integration Test Image and run Unit Tests"
118118
run: |
119119
BUILD_FOR_CI=true make

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
2626

2727
# Initializes the CodeQL tools for scanning.
2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v2
29+
uses: github/codeql-action/init@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
3030
with:
3131
languages: ${{ matrix.language }}
3232
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -37,7 +37,7 @@ jobs:
3737
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
3838
# If this step fails, then you should remove it and run the build manually (see below)
3939
- name: Autobuild
40-
uses: github/codeql-action/autobuild@v2
40+
uses: github/codeql-action/autobuild@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
4141

4242
# ℹ️ Command-line programs to run using the OS shell.
4343
# 📚 https://git.io/JvXDl
@@ -51,4 +51,4 @@ jobs:
5151
# make release
5252

5353
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v2
54+
uses: github/codeql-action/analyze@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2

.github/workflows/factory.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,40 @@ jobs:
2525
steps:
2626
- name: Checkout code without refs
2727
if: ${{ inputs.refs == '' }}
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2929

3030
- name: Checkout code with refs
3131
if: ${{ inputs.refs != '' }}
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3333
with:
3434
ref: ${{ inputs.refs }}
3535

3636
- name: Set up QEMU
37-
uses: docker/setup-qemu-action@v3
37+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
3838

3939
- name: Set up Docker Buildx
40-
uses: docker/setup-buildx-action@v3
40+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
4141

4242
- name: Run dapper
4343
run: make ci
4444

4545
- name: Read some Secrets
46-
uses: rancher-eio/read-vault-secrets@main
46+
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
4747
if: ${{ inputs.push == true }}
4848
with:
4949
secrets: |
5050
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
5151
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD
5252
5353
- name: Login to Docker Hub
54-
uses: docker/login-action@v3
54+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
5555
if: ${{ inputs.push == true }}
5656
with:
5757
username: ${{ env.DOCKER_USERNAME }}
5858
password: ${{ env.DOCKER_PASSWORD }}
5959

6060
- name: Docker Build (Controller)
61-
uses: docker/build-push-action@v5
61+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
6262
with:
6363
provenance: false
6464
context: .
@@ -68,11 +68,11 @@ jobs:
6868
tags: ${{ env.repo }}/${{ env.controllerImageName }}:${{ inputs.tag }}
6969

7070
- name: Docker Build (Webhook)
71-
uses: docker/build-push-action@v5
71+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
7272
with:
7373
provenance: false
7474
context: .
7575
platforms: linux/amd64,linux/arm64
7676
file: package/Dockerfile.webhook
7777
push: ${{ inputs.push }}
78-
tags: ${{ env.repo }}/${{ env.webhookImageName }}:${{ inputs.tag }}
78+
tags: ${{ env.repo }}/${{ env.webhookImageName }}:${{ inputs.tag }}

.github/workflows/fossa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
# The FOSSA token is shared between all repos in Harvester's GH org. It can
2121
# be used directly and there is no need to request specific access to EIO.
2222
- name: Read FOSSA token
23-
uses: rancher-eio/read-vault-secrets@main
23+
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
2424
with:
2525
secrets: |
2626
secret/data/github/org/harvester/fossa/credentials token | FOSSA_API_KEY_PUSH_ONLY
2727
2828
- name: FOSSA scan
29-
uses: fossas/fossa-action@main
29+
uses: fossas/fossa-action@c414b9ad82eaad041e47a7cf62a4f02411f427a0 # v1.8.0
3030
with:
3131
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
3232
# Only runs the scan and do not provide/returns any results back to the

.github/workflows/scan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1616

1717
- name: Download Rancher's VEX Hub report
1818
run: curl -fsSO https://raw.githubusercontent.com/rancher/vexhub/refs/heads/main/reports/rancher.openvex.json
1919

2020
- name: Run Trivy vulnerability scanner in repo mode
21-
uses: aquasecurity/trivy-action@master
21+
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
2222
with:
2323
scan-type: 'fs'
2424
ignore-unfixed: true
@@ -30,6 +30,6 @@ jobs:
3030
TRIVY_SHOW_SUPPRESSED: true
3131

3232
- name: Upload Trivy scan results to GitHub Security tab
33-
uses: github/codeql-action/upload-sarif@v3
33+
uses: github/codeql-action/upload-sarif@ebcb5b36ded6beda4ceefea6a8bc4cc885255bb3 # v3
3434
with:
3535
sarif_file: 'trivy-results.sarif'

0 commit comments

Comments
 (0)