Skip to content

Commit 204bfc0

Browse files
committed
workflow: pin actions with sha
And run update check only once a week. Signed-off-by: Tuomas Katila <[email protected]>
1 parent 0549558 commit 204bfc0

File tree

9 files changed

+42
-41
lines changed

9 files changed

+42
-41
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ updates:
1212
- package-ecosystem: "github-actions"
1313
directory: "/"
1414
schedule:
15-
# Check for updates to GitHub Actions every weekday
16-
interval: "daily"
15+
# Check for updates to GitHub Actions every week on Sunday
16+
interval: "weekly"
17+
day: "sunday"

.github/workflows/lib-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
- dlb-libdlb-demo
4646
builder: [buildah, docker]
4747
steps:
48-
- uses: actions/checkout@v4
49-
- uses: actions/setup-go@v5
48+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
49+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
5050
with:
5151
go-version-file: go.mod
5252
check-latest: true

.github/workflows/lib-codeql.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
2222

23-
- uses: actions/setup-go@v5
23+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
2424
with:
2525
go-version-file: go.mod
2626
check-latest: true
2727

2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v3
29+
uses: github/codeql-action/init@187e591bef188a41dd329c95d7905134173654ae # v3
3030
with:
3131
languages: 'go'
3232

3333
- name: Perform CodeQL Analysis
34-
uses: github/codeql-action/analyze@v3
34+
uses: github/codeql-action/analyze@187e591bef188a41dd329c95d7905134173654ae # v3
3535
with:
3636
category: "/language:go"

.github/workflows/lib-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
IMAGES: ${{ join(matrix.images, ' ') }}
6868

6969
steps:
70-
- uses: actions/checkout@v4
70+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
7171
with:
7272
fetch-depth: 0
7373
- name: Describe test environment

.github/workflows/lib-publish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
#- crypto-perf
4343
#- opae-nlb-demo
4444
steps:
45-
- uses: actions/checkout@v4
46-
- uses: actions/setup-go@v5
45+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
46+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
4747
with:
4848
go-version-file: go.mod
4949
check-latest: true
@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
REG=intel/ make ${IMAGE_NAME} BUILDER=docker
5656
- name: Trivy scan for image
57-
uses: aquasecurity/trivy-action@master
57+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
5858
with:
5959
scan-type: image
6060
image-ref: intel/${{ matrix.image }}:${{ inputs.image_tag }}
@@ -64,7 +64,7 @@ jobs:
6464
if: ${{ !contains(fromJson(env.no_base_check), matrix.image) }}
6565
run: IMG=intel/${{ matrix.image }}:${{ inputs.image_tag }} make test-image-base-layer BUILDER=docker
6666
- name: Login
67-
uses: docker/login-action@v3
67+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3
6868
with:
6969
username: ${{ secrets.DOCKERHUB_USER }}
7070
password: ${{ secrets.DOCKERHUB_PASS }}

.github/workflows/lib-scorecard.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ jobs:
1616
id-token: write
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
2020
with:
2121
persist-credentials: false
2222

2323
- name: "Analyze project"
24-
uses: ossf/[email protected]
24+
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
2525
with:
2626
results_file: results.sarif
2727
results_format: sarif
2828
publish_results: true
2929

3030
- name: "Upload results to security"
31-
uses: github/codeql-action/upload-sarif@v3
31+
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
3232
with:
3333
sarif_file: results.sarif

.github/workflows/lib-trivy.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
runs-on: ubuntu-22.04
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
3434

3535
- name: Run Trivy in config mode for deployments
36-
uses: aquasecurity/trivy-action@master
36+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
3737
with:
3838
scan-type: config
3939
scan-ref: deployments/
@@ -49,10 +49,10 @@ jobs:
4949
runs-on: ubuntu-22.04
5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
5353

5454
- name: Run Trivy in config mode for dockerfiles
55-
uses: aquasecurity/trivy-action@master
55+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
5656
with:
5757
scan-type: config
5858
scan-ref: build/docker/
@@ -64,10 +64,10 @@ jobs:
6464
name: Scan licenses
6565
steps:
6666
- name: Checkout
67-
uses: actions/checkout@v4
67+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
6868

6969
- name: Run Trivy in fs mode
70-
uses: aquasecurity/trivy-action@master
70+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
7171
with:
7272
scan-type: fs
7373
scan-ref: .
@@ -83,11 +83,11 @@ jobs:
8383
name: Scan vulnerabilities
8484
steps:
8585
- name: Checkout
86-
uses: actions/checkout@v4
86+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
8787

8888
- name: Run Trivy in fs mode
8989
continue-on-error: true
90-
uses: aquasecurity/trivy-action@master
90+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
9191
with:
9292
scan-type: fs
9393
scan-ref: .
@@ -97,7 +97,7 @@ jobs:
9797
output: trivy-report.json
9898

9999
- name: Show report in human-readable format
100-
uses: aquasecurity/trivy-action@master
100+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
101101
with:
102102
scan-type: convert
103103
vuln-type: ''
@@ -107,7 +107,7 @@ jobs:
107107

108108
- name: Convert report to sarif
109109
if: ${{ inputs.upload-to-github-security-tab }}
110-
uses: aquasecurity/trivy-action@master
110+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
111111
with:
112112
scan-type: convert
113113
vuln-type: ''
@@ -118,13 +118,13 @@ jobs:
118118

119119
- name: Upload sarif report to GitHub Security tab
120120
if: ${{ inputs.upload-to-github-security-tab }}
121-
uses: github/codeql-action/upload-sarif@v3
121+
uses: github/codeql-action/upload-sarif@187e591bef188a41dd329c95d7905134173654ae # v3
122122
with:
123123
sarif_file: trivy-report.sarif
124124

125125
- name: Convert report to csv
126126
if: ${{ inputs.export-csv }}
127-
uses: aquasecurity/trivy-action@master
127+
uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # 0.20.0
128128
with:
129129
scan-type: convert
130130
vuln-type: ''
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Upload CSV report as an artifact
138138
if: ${{ inputs.export-csv }}
139-
uses: actions/upload-artifact@v4
139+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
140140
with:
141141
name: trivy-report
142142
path: trivy-report.csv

.github/workflows/lib-validate.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: |
1515
sudo apt-get update
1616
sudo apt-get install -y python3-venv
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
1818
with:
1919
fetch-depth: 0
2020
- name: Set up doc directory
@@ -35,13 +35,13 @@ jobs:
3535
name: lint
3636
runs-on: ubuntu-22.04
3737
steps:
38-
- uses: actions/checkout@v4
39-
- uses: actions/setup-go@v5
38+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
39+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
4040
with:
4141
go-version-file: go.mod
4242
check-latest: true
4343
- name: golangci-lint
44-
uses: golangci/golangci-lint-action@v6
44+
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6
4545
with:
4646
version: v1.57.2
4747
args: -v --timeout 5m
@@ -50,8 +50,8 @@ jobs:
5050
name: Build and check device plugins
5151
runs-on: ubuntu-22.04
5252
steps:
53-
- uses: actions/checkout@v4
54-
- uses: actions/setup-go@v5
53+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
54+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
5555
with:
5656
go-version-file: go.mod
5757
check-latest: true
@@ -74,8 +74,8 @@ jobs:
7474
- 1.29.x
7575
- 1.30.x
7676
steps:
77-
- uses: actions/checkout@v4
78-
- uses: actions/setup-go@v5
77+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
78+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
7979
with:
8080
go-version-file: go.mod
8181
check-latest: true

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
sudo apt-get update
2525
sudo apt-get install -y python3-venv git
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
2727
with:
2828
fetch-depth: 0
2929
ref: main
@@ -44,7 +44,7 @@ jobs:
4444
rm -rf _work/venv
4545
make vhtml
4646
mv _build/html/* $HOME/output/
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
4848
with:
4949
fetch-depth: 0
5050
ref: release-0.28
@@ -55,7 +55,7 @@ jobs:
5555
rm -rf _work/venv
5656
make vhtml
5757
mv _build/html $HOME/output/0.28
58-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
5959
with:
6060
fetch-depth: 0
6161
ref: release-0.29
@@ -66,7 +66,7 @@ jobs:
6666
rm -rf _work/venv
6767
make vhtml
6868
mv _build/html $HOME/output/0.29
69-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
7070
with:
7171
fetch-depth: 0
7272
ref: release-0.30

0 commit comments

Comments
 (0)