Skip to content

Commit 0e39d40

Browse files
authored
Merge pull request #214 from step-security-bot/stepsecurity_remediation_1707218368
[StepSecurity] ci: Harden GitHub Actions
2 parents 3f5a946 + c0994a3 commit 0e39d40

File tree

7 files changed

+25
-13
lines changed

7 files changed

+25
-13
lines changed

.github/workflows/basic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3030

3131
- name: Install apt packages
3232
run: |
@@ -144,7 +144,7 @@ jobs:
144144

145145
steps:
146146
- name: Checkout
147-
uses: actions/checkout@v4
147+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
148148

149149
- name: Install apt packages
150150
run: |
@@ -231,7 +231,7 @@ jobs:
231231
runs-on: ${{matrix.os}}
232232

233233
steps:
234-
- uses: actions/checkout@v4
234+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
235235

236236
# Use '14.38.33130' MSVC toolset when compiling UMF with ASan.
237237
# Running binaries compiled with older toolsets results in a
@@ -240,7 +240,7 @@ jobs:
240240
# https://github.com/actions/runner-images/issues/8891
241241
- name: Setup MSVC dev command prompt
242242
if: matrix.os == 'windows-2022' && matrix.sanitizers.asan == 'ON'
243-
uses: TheMrMilchmann/setup-msvc-dev@v3
243+
uses: TheMrMilchmann/setup-msvc-dev@48edcef51a12c80d7e62ace57aae1417795e511c # v3.0.0
244244
with:
245245
arch: x64
246246
toolset: 14.38.33130
@@ -274,7 +274,7 @@ jobs:
274274
runs-on: ${{matrix.os}}
275275

276276
steps:
277-
- uses: actions/checkout@v4
277+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
278278

279279
- name: Install Python requirements
280280
run: python3 -m pip install -r third_party/requirements.txt

.github/workflows/benchmarks.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Benchmarks
22

33
on: workflow_call
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
ubuntu-build:
710
name: Build - Ubuntu
@@ -15,7 +18,7 @@ jobs:
1518

1619
steps:
1720
- name: Checkout
18-
uses: actions/checkout@v4
21+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1922

2023
- name: Install apt packages
2124
run: |

.github/workflows/codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CodeQL
22

33
on: workflow_call
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
analyze:
710
name: Analyze
@@ -22,7 +25,7 @@ jobs:
2225

2326
steps:
2427
- name: Checkout repository
25-
uses: actions/checkout@v4
28+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2629

2730
- name: Initialize CodeQL
2831
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2020

2121
- name: Install doxygen
2222
run: >

.github/workflows/nightly.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
schedule:
77
- cron: '0 0 * * *'
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
Valgrind:
1114
name: Valgrind
@@ -17,7 +20,7 @@ jobs:
1720

1821
steps:
1922
- name: Checkout repository
20-
uses: actions/checkout@v4
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2124

2225
- name: Install apt packages
2326
run: |

.github/workflows/pr_push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3030

3131
- name: Install apt packages
3232
if: matrix.os == 'ubuntu-latest'
@@ -57,7 +57,7 @@ jobs:
5757

5858
steps:
5959
- name: Checkout repository
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6161

6262
- name: Install apt packages
6363
run: |

.github/workflows/spellcheck.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ name: SpellCheck
22

33
on: workflow_call
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
name: Run spell check
811
runs-on: ubuntu-latest
912
steps:
1013
- name: Checkout
11-
uses: actions/checkout@v4
14+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1215

1316
- name: Run a spell check
14-
uses: crate-ci/[email protected]
17+
uses: crate-ci/typos@c97d621b6b01d8b0258538ca15abeca5c5764601 # v1.16.23
1518
with:
1619
config: ./.github/workflows/.spellcheck-conf.toml

0 commit comments

Comments
 (0)