Skip to content

Commit ed2b49d

Browse files
[StepSecurity] ci: Harden GitHub Actions (#1736)
Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: Olga Malysheva <[email protected]>
1 parent adb0a81 commit ed2b49d

File tree

5 files changed

+28
-28
lines changed

5 files changed

+28
-28
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: [ubuntu-22.04]
3838
timeout-minutes: 10
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4141
- name: Run scan
4242
run: |
4343
sudo apt update && sudo apt install -y codespell
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: [ubuntu-22.04]
4848
timeout-minutes: 10
4949
steps:
50-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5151
- name: Run scan
5252
run: |
5353
command -v clang-format
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: [ubuntu-latest]
6363
timeout-minutes: 10
6464
steps:
65-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6666
- name: Install prerequisites
6767
run: |
6868
pip3 install -U Jinja2
@@ -75,7 +75,7 @@ jobs:
7575
export BUILD_TYPE=${BUILD_TYPE} && sphinx-build doc html
7676
tar -czvf html.tar.gz html/
7777
- name: Save docs
78-
uses: actions/upload-artifact@v4
78+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7979
with:
8080
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
8181
path: html.tar.gz
@@ -90,14 +90,14 @@ jobs:
9090
needs: [documentation]
9191
steps:
9292
- name: Checkout gh-pages
93-
uses: actions/checkout@v4
93+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9494
with:
9595
ref: gh-pages
9696
path: gh-pages
9797
- name: Set env
9898
run: echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV
9999
- name: Download documetation
100-
uses: actions/download-artifact@v4
100+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
101101
with:
102102
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
103103
- name: Publish to github pages
@@ -117,7 +117,7 @@ jobs:
117117
if: ${{ github.ref != 'refs/heads/master' }}
118118
runs-on: [ubuntu-latest]
119119
steps:
120-
- uses: actions/checkout@v4
120+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
121121
with:
122122
fetch-depth: 0
123123
- name: Run check
@@ -137,7 +137,7 @@ jobs:
137137
runs-on: [ubuntu-latest]
138138
timeout-minutes: 15
139139
steps:
140-
- uses: actions/checkout@v4
140+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
141141
- name: Run testing
142142
run: |
143143
mkdir build && cd build
@@ -185,7 +185,7 @@ jobs:
185185
preview: 'ON'
186186
cmake_static: -DBUILD_SHARED_LIBS=OFF
187187
steps:
188-
- uses: actions/checkout@v4
188+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
189189
- name: Run testing
190190
shell: bash
191191
run: |
@@ -224,7 +224,7 @@ jobs:
224224
preview: 'ON'
225225
cmake_static: -DBUILD_SHARED_LIBS=OFF
226226
steps:
227-
- uses: actions/checkout@v4
227+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
228228
- name: Run testing
229229
shell: bash
230230
run: |
@@ -269,7 +269,7 @@ jobs:
269269
preview: 'OFF'
270270
job_name: windows_cl2022_cxx17_relwithdebinfo_preview=OFF
271271
steps:
272-
- uses: actions/checkout@v4
272+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
273273
- name: Run testing
274274
run: |
275275
mkdir build
@@ -307,7 +307,7 @@ jobs:
307307
build_type: debug
308308
preview: 'ON'
309309
steps:
310-
- uses: actions/checkout@v4
310+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
311311
- name: Run testing
312312
shell: bash
313313
run: |
@@ -333,7 +333,7 @@ jobs:
333333
build_type: relwithdebinfo
334334
preview: 'ON'
335335
steps:
336-
- uses: actions/checkout@v4
336+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
337337
- name: Run testing
338338
shell: bash
339339
run: |
@@ -369,7 +369,7 @@ jobs:
369369
preview: 'OFF'
370370
job_name: examples_windows_cl2022_cxx17_relwithdebinfo_preview=OFF
371371
steps:
372-
- uses: actions/checkout@v4
372+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
373373
- name: Run testing
374374
run: |
375375
mkdir build
@@ -393,7 +393,7 @@ jobs:
393393
std: 20
394394
build_type: relwithdebinfo
395395
steps:
396-
- uses: actions/checkout@v4
396+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
397397
- name: Test doc examples
398398
run: |
399399
mkdir build && cd build
@@ -418,7 +418,7 @@ jobs:
418418
std: 20
419419
build_type: relwithdebinfo
420420
steps:
421-
- uses: actions/checkout@v4
421+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
422422
- name: Test doc examples
423423
run: |
424424
mkdir build

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ jobs:
4646

4747
steps:
4848
- name: Harden Runner
49-
uses: step-security/[email protected]
49+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
5050
with:
5151
egress-policy: audit
5252

5353
- name: Checkout repository
54-
uses: actions/checkout@v4
54+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5555

5656
# Initializes the CodeQL tools for scanning.
5757
- name: Initialize CodeQL
58-
uses: github/codeql-action/init@v3
58+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5959
with:
6060
languages: ${{ matrix.language }}
6161

6262
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6363
# If this step fails, then you should remove it and run the build manually (see below)
6464
- name: Autobuild
65-
uses: github/codeql-action/[email protected]
65+
uses: github/codeql-action/autobuild@4355270be187e1b672a7a1c7c7bae5afdc1ab94a # v3.24.10
6666

6767
# If the analyze step fails for one of the languages you are analyzing with
6868
# "We were unable to automatically build your code", modify the matrix above
@@ -81,6 +81,6 @@ jobs:
8181
# exit 1
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@v3
84+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/issue_labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023-2024 Intel Corporation
1+
# Copyright (c) 2023-2025 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ jobs:
2929
issues: write
3030
contents: read
3131
steps:
32-
- uses: github/issue-labeler@v3.4 #May not be the latest version
32+
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
3333
with:
3434
repo-token: "${{ secrets.GITHUB_TOKEN }}"
3535
configuration-path: .github/issue_labeler.yml

.github/workflows/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2023-2024 Intel Corporation
1+
# Copyright (c) 2023-2025 Intel Corporation
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ jobs:
2424
pull-requests: write
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@v4
28-
- uses: actions/labeler@v5
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
2929
with:
3030
configuration-path: .github/labeler.yml

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242

4343
steps:
4444
- name: "Checkout code"
45-
uses: actions/[email protected]
45+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4646
with:
4747
persist-credentials: false
4848

4949
- name: "Run analysis"
50-
uses: ossf/[email protected]
50+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
5151
with:
5252
results_file: results.sarif
5353
results_format: sarif

0 commit comments

Comments
 (0)