Skip to content

Commit e69a277

Browse files
authored
Merge pull request #74 from step-security-bot/chore/GHA-030216-stepsecurity-remediation
[StepSecurity] ci: Harden GitHub Actions
2 parents 26faa93 + d403df5 commit e69a277

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

.github/workflows/build-with-clang.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Cancel Previous Runs
28-
uses: styfle/[email protected]
28+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
2929
with:
3030
access_token: ${{ github.token }}
3131

@@ -44,18 +44,18 @@ jobs:
4444
sudo apt-get install intel-oneapi-mkl-devel
4545
4646
- name: Setup Python
47-
uses: actions/setup-python@v5
47+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4848
with:
4949
python-version: ${{ matrix.python }}
5050
architecture: x64
5151

5252
- name: Checkout repo
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5454
with:
5555
fetch-depth: 0
5656

5757
- name: Install mkl-service dependencies
58-
uses: BSFishy/pip-action@v1
58+
uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
5959
with:
6060
packages: |
6161
cython

.github/workflows/conda-package.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525

2626
steps:
2727
- name: Cancel Previous Runs
28-
uses: styfle/[email protected]
28+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
2929
with:
3030
access_token: ${{ github.token }}
3131

32-
- uses: actions/[email protected]
32+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3333
with:
3434
fetch-depth: 0
3535

@@ -38,7 +38,7 @@ jobs:
3838
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
3939
4040
- name: Cache conda packages
41-
uses: actions/cache@v4
41+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4242
env:
4343
CACHE_NUMBER: 0 # Increase to reset cache
4444
with:
@@ -68,7 +68,7 @@ jobs:
6868
conda-recipe
6969
7070
- name: Upload artifact
71-
uses: actions/[email protected]
71+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7272
with:
7373
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
7474
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda
@@ -84,21 +84,21 @@ jobs:
8484

8585
steps:
8686
- name: Cancel Previous Runs
87-
uses: styfle/[email protected]
87+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
8888
with:
8989
access_token: ${{ github.token }}
9090

91-
- uses: actions/[email protected]
91+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
9292
with:
9393
fetch-depth: 0
94-
- uses: conda-incubator/setup-miniconda@v3
94+
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
9595
with:
9696
conda-remove-defaults: true
9797
auto-activate-base: true
9898
activate-environment: ""
9999

100100
- name: Cache conda packages
101-
uses: actions/cache@v4
101+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
102102
env:
103103
CACHE_NUMBER: 3 # Increase to reset cache
104104
with:
@@ -116,7 +116,7 @@ jobs:
116116
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
117117

118118
- name: Upload artifact
119-
uses: actions/[email protected]
119+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
120120
with:
121121
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
122122
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.conda
@@ -136,7 +136,7 @@ jobs:
136136

137137
steps:
138138
- name: Download artifact
139-
uses: actions/download-artifact@v4
139+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
140140
with:
141141
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
142142

@@ -169,7 +169,7 @@ jobs:
169169
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
170170
171171
- name: Cache conda packages
172-
uses: actions/cache@v4
172+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
173173
env:
174174
CACHE_NUMBER: 0 # Increase to reset cache
175175
with:
@@ -210,10 +210,10 @@ jobs:
210210

211211
steps:
212212
- name: Download artifact
213-
uses: actions/download-artifact@v4
213+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
214214
with:
215215
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
216-
- uses: conda-incubator/setup-miniconda@v3
216+
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
217217
with:
218218
conda-remove-defaults: true
219219
auto-activate-base: true
@@ -244,7 +244,7 @@ jobs:
244244
more lockfile
245245
246246
- name: Cache conda packages
247-
uses: actions/cache@v4
247+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
248248
env:
249249
CACHE_NUMBER: 3 # Increase to reset cache
250250
with:

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6262
# format to the repository Actions tab.
6363
- name: "Upload artifact"
64-
uses: actions/[email protected]
64+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6565
with:
6666
name: SARIF file
6767
path: results.sarif

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
timeout-minutes: 30
1414
steps:
1515
- name: Checkout repo
16-
uses: actions/[email protected]
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

1818
- name: Set up python
19-
uses: actions/setup-python@v5
19+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2020
with:
2121
python-version: '3.12'
2222

2323
- name: Set up pip packages
24-
uses: BSFishy/pip-action@v1
24+
uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
2525
with:
2626
packages: |
2727
codespell
@@ -35,4 +35,4 @@ jobs:
3535
clang-format --version
3636
3737
- name: Run pre-commit checks
38-
uses: pre-commit/[email protected]
38+
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

0 commit comments

Comments
 (0)