Skip to content

Commit bad2d69

Browse files
step-security-botfreddidierRTE
authored andcommitted
[StepSecurity] ci: Harden GitHub Actions
Signed-off-by: StepSecurity Bot <[email protected]>
1 parent fbcb80f commit bad2d69

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

.github/workflows/anchore-analysis.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout the code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1616
- name: Pull docker images
1717
run: |
1818
docker pull lfeoperatorfabric/of-cards-consultation-service:SNAPSHOT
@@ -25,101 +25,101 @@ jobs:
2525
docker pull lfeoperatorfabric/of-supervisor:SNAPSHOT
2626
docker pull lfeoperatorfabric/of-web-ui:SNAPSHOT
2727
- name: Analyse card consultation
28-
uses: anchore/scan-action@v3
28+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
2929
with:
3030
image: "lfeoperatorfabric/of-cards-consultation-service:SNAPSHOT"
3131
acs-report-enable: true
3232
fail-build: false
3333
- name: Upload Anchore Scan Report for cards-consultation
34-
uses: github/codeql-action/upload-sarif@v3
34+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
3535
with:
3636
sarif_file: results.sarif
3737
category: consultation
3838
- name: Analyse card publication
39-
uses: anchore/scan-action@v3
39+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
4040
with:
4141
image: "lfeoperatorfabric/of-cards-publication-service:SNAPSHOT"
4242
acs-report-enable: true
4343
fail-build: false
4444
- name: Upload Anchore Scan Report for cards-publication
45-
uses: github/codeql-action/upload-sarif@v3
45+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
4646
with:
4747
sarif_file: results.sarif
4848
category: publication
4949
- name: Analyse users
50-
uses: anchore/scan-action@v3
50+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
5151
with:
5252
image: "lfeoperatorfabric/of-users-service:SNAPSHOT"
5353
acs-report-enable: true
5454
fail-build: false
5555
- name: Upload Anchore Scan Report for users
56-
uses: github/codeql-action/upload-sarif@v3
56+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
5757
with:
5858
sarif_file: results.sarif
5959
category: users
6060
- name: Analyse businessConfig
61-
uses: anchore/scan-action@v3
61+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
6262
with:
6363
image: "lfeoperatorfabric/of-businessconfig-service:SNAPSHOT"
6464
acs-report-enable: true
6565
fail-build: false
6666
- name: Upload Anchore Scan Report for businessConfig
67-
uses: github/codeql-action/upload-sarif@v3
67+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
6868
with:
6969
sarif_file: results.sarif
7070
category: businessconfig
7171
- name: Analyse external-devices
72-
uses: anchore/scan-action@v3
72+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
7373
with:
7474
image: "lfeoperatorfabric/of-external-devices-service:SNAPSHOT"
7575
acs-report-enable: true
7676
fail-build: false
7777
- name: Upload Anchore Scan Report for external devices
78-
uses: github/codeql-action/upload-sarif@v3
78+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
7979
with:
8080
sarif_file: results.sarif
8181
category: external-devices
8282
- name: Analyse web-ui
83-
uses: anchore/scan-action@v3
83+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
8484
with:
8585
image: "lfeoperatorfabric/of-web-ui:SNAPSHOT"
8686
acs-report-enable: true
8787
fail-build: false
8888
- name: Upload Anchore Scan Report for web-ui
89-
uses: github/codeql-action/upload-sarif@v3
89+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
9090
with:
9191
sarif_file: results.sarif
9292
category: web-ui
9393
- name: Analyse external-diffusion
94-
uses: anchore/scan-action@v3
94+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
9595
with:
9696
image: "lfeoperatorfabric/of-cards-external-diffusion-service:SNAPSHOT"
9797
acs-report-enable: true
9898
fail-build: false
9999
- name: Upload Anchore Scan Report for external-diffusion
100-
uses: github/codeql-action/upload-sarif@v3
100+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
101101
with:
102102
sarif_file: results.sarif
103103
category: external-diffusion
104104
- name: Analyse cards reminder
105-
uses: anchore/scan-action@v3
105+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
106106
with:
107107
image: "lfeoperatorfabric/of-cards-reminder:SNAPSHOT"
108108
acs-report-enable: true
109109
fail-build: false
110110
- name: Upload Anchore Scan Report for cards-reminder
111-
uses: github/codeql-action/upload-sarif@v3
111+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
112112
with:
113113
sarif_file: results.sarif
114114
category: cards-reminder
115115
- name: Analyse supervisor
116-
uses: anchore/scan-action@v3
116+
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
117117
with:
118118
image: "lfeoperatorfabric/of-supervisor:SNAPSHOT"
119119
acs-report-enable: true
120120
fail-build: false
121121
- name: Upload Anchore Scan Report for supervisor
122-
uses: github/codeql-action/upload-sarif@v3
122+
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
123123
with:
124124
sarif_file: results.sarif
125125
category: supervisor

.github/workflows/main.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
if: ${{ github.event.inputs.dockerPush != 'true' && github.event.inputs.dockerPushLatest != 'true' && github.event.inputs.doc != 'true' && github.event.inputs.docLatest != 'true' && github.event_name != 'schedule' && github.ref_name != 'master' }}
5050
steps:
51-
- uses: actions/checkout@v4
51+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5252

5353
- name: Job status
5454
run: |
@@ -61,7 +61,7 @@ jobs:
6161
echo "Opfab Version : ${OF_VERSION}"
6262
echo "---------------------------"
6363
- name: Cache Gradle packages
64-
uses: actions/cache@v4
64+
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
6565
with:
6666
path: |
6767
~/.gradle/caches
@@ -92,7 +92,7 @@ jobs:
9292
run: ./CICD/github/launch_cypress_tests.sh ${{ github.event.inputs.cypressTestFiles }}
9393

9494
- name: Upload cypress screenshots and logs
95-
uses: actions/upload-artifact@v4
95+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
9696
if: failure()
9797
with:
9898
name: cypress-screenshots
@@ -104,7 +104,7 @@ jobs:
104104
environment: publishVersion
105105
if: ${{ github.event.inputs.dockerPush == 'true' || github.event.inputs.dockerPushLatest == 'true' || github.event.inputs.doc == 'true' || github.event.inputs.docLatest == 'true' || github.event_name == 'schedule' || github.ref_name == 'master' }}
106106
steps:
107-
- uses: actions/checkout@v4
107+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
108108

109109
- name: Job status
110110
run: |
@@ -117,7 +117,7 @@ jobs:
117117
echo "Opfab Version : ${OF_VERSION}"
118118
echo "---------------------------"
119119
- name: Cache Gradle packages
120-
uses: actions/cache@v4
120+
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
121121
with:
122122
path: |
123123
~/.gradle/caches
@@ -148,7 +148,7 @@ jobs:
148148
run: ./CICD/github/launch_cypress_tests.sh
149149

150150
- name: Upload cypress screenshots
151-
uses: actions/upload-artifact@v4
151+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
152152
if: failure()
153153
with:
154154
name: cypress-screenshots

.github/workflows/ort_scan.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
tortellini:
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v4
29-
- uses: tortellini-tools/action@v3
30-
- uses: actions/upload-artifact@v4
28+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
29+
- uses: tortellini-tools/action@683836c1762a9e3c5ef5493548dfb15d5a5dec6d # v3
30+
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
3131
with:
3232
name: tortellini-result
3333
path: .tortellini/out

.github/workflows/testWithOldMongo.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1515

1616
- name: Job status
1717
run: |
@@ -22,7 +22,7 @@ jobs:
2222
echo "---------------------------"
2323
2424
- name: Cache Gradle packages
25-
uses: actions/cache@v4
25+
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
2626
with:
2727
path: |
2828
~/.gradle/caches
@@ -48,7 +48,7 @@ jobs:
4848
run: ./CICD/github/launch_cypress_tests.sh
4949

5050
- name: Upload cypress screenshots
51-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
5252
if: failure()
5353
with:
5454
name: cypress-screenshots

.github/workflows/verify_copyright.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
in_changed_files:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1111

1212
- name: Get changed files
1313
id: changed-files
14-
uses: tj-actions/[email protected]
14+
uses: tj-actions/changed-files@800a2825992141ddde1a8bca8ad394cec34d3188 # v42.0.5
1515

1616
- name: Verify copyright headers
1717
run: ./CICD/github/licenceHeaderCheck.sh ${{ steps.changed-files.outputs.all_changed_files }}

0 commit comments

Comments
 (0)