Skip to content

Commit 284b126

Browse files
Copilotigaw
andcommitted
ci: pin all GitHub Actions to SHA of latest release version
Replace mutable version tags (e.g. @v6) with the commit SHA of the latest release in each major version series, keeping the tag as a trailing comment for readability. This prevents a compromised or moved tag from silently changing what code executes in CI. SHA → version used: actions/checkout de0fac2e = v6.0.2 actions/upload-artifact b7c566a7 = v6.0.0 / 330a01c4 = v5.0.0 actions/download-artifact 37930b1c = v7.0.0 actions/upload-release-asset e8f9f06c = v1.0.2 docker/setup-qemu-action c7c53464 = v3.7.0 docker/login-action c94ce9fb = v3.7.0 mosteo-actions/docker-run 4824fd41 = branch v2 webispy/checkpatch-action 58374fe5 = v9 github/codeql-action 89a39a4e = v4.32.4 codecov/codecov-action 671740ac = v5.5.2 ncipollo/release-action b7eabc95 = v1.20.0 sand4rt/ftp-deployer 518beaad = v1.8 pypa/gh-action-pypi-publish ed0c5393 = v1.13.0 Co-authored-by: igaw <[email protected]>
1 parent c3aef8e commit 284b126

11 files changed

Lines changed: 44 additions & 44 deletions

.github/workflows/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
container:
2020
image: ghcr.io/linux-nvme/debian.python:latest
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
- name: Mark repo as safe for git
2424
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2525
- name: build
2626
run: |
2727
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} -x
28-
- uses: actions/upload-artifact@v6
28+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
2929
name: upload logs
3030
if: failure()
3131
with:
@@ -42,13 +42,13 @@ jobs:
4242
container:
4343
image: ghcr.io/linux-nvme/debian.python:latest
4444
steps:
45-
- uses: actions/checkout@v6
45+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4646
- name: Mark repo as safe for git
4747
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
4848
- name: build
4949
run: |
5050
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }} -x libnvme
51-
- uses: actions/upload-artifact@v6
51+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5252
name: upload logs
5353
if: failure()
5454
with:
@@ -65,17 +65,17 @@ jobs:
6565
- arch: s390x
6666
- arch: ppc64le
6767
steps:
68-
- uses: actions/checkout@v6
68+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6969
- name: enable foreign arch
70-
uses: docker/setup-qemu-action@v3
70+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
7171
- name: Login to GitHub Container Registry
72-
uses: docker/login-action@v3
72+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
7373
with:
7474
registry: ghcr.io
7575
username: ${{ github.actor }}
7676
password: ${{ secrets.GITHUB_TOKEN }}
7777
- name: compile and run unit tests
78-
uses: mosteo-actions/docker-run@v2
78+
uses: mosteo-actions/docker-run@4824fd41b1d9573e6fad57f575a884696465b44f # v2
7979
with:
8080
image: ghcr.io/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest
8181
guest-dir: /build
@@ -85,7 +85,7 @@ jobs:
8585
scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
8686
params: "--platform linux/amd64"
8787
pull-params: "--platform linux/amd64"
88-
- uses: actions/upload-artifact@v6
88+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
8989
name: upload logs
9090
if: failure()
9191
with:
@@ -100,13 +100,13 @@ jobs:
100100
image: ghcr.io/linux-nvme/debian:latest
101101
if: github.ref == 'refs/heads/master'
102102
steps:
103-
- uses: actions/checkout@v6
103+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
104104
- name: Mark repo as safe for git
105105
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
106106
- name: build
107107
run: |
108108
scripts/build.sh -b release -c gcc fallback
109-
- uses: actions/upload-artifact@v6
109+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
110110
if: failure()
111111
with:
112112
name: log files
@@ -119,7 +119,7 @@ jobs:
119119
container:
120120
image: ghcr.io/linux-nvme/debian:latest
121121
steps:
122-
- uses: actions/checkout@v6
122+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
123123
- name: Mark repo as safe for git
124124
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
125125
- name: build
@@ -132,7 +132,7 @@ jobs:
132132
container:
133133
image: ghcr.io/linux-nvme/debian:latest
134134
steps:
135-
- uses: actions/checkout@v6
135+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
136136
- name: Mark repo as safe for git
137137
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
138138
- name: build
@@ -145,7 +145,7 @@ jobs:
145145
container:
146146
image: ghcr.io/linux-nvme/debian:latest
147147
steps:
148-
- uses: actions/checkout@v6
148+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
149149
- name: Mark repo as safe for git
150150
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
151151
- name: build

.github/workflows/checkpatch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
steps:
88
- name: 'Calculate PR commits + 1'
99
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
10-
- uses: actions/checkout@v6
10+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1111
with:
1212
ref: ${{ github.event.pull_request.head.sha }}
1313
fetch-depth: 0
1414
- name: Run checkpatch review
15-
uses: webispy/checkpatch-action@v9
15+
uses: webispy/checkpatch-action@58374fe5bb03358b23d3d6871e2ff290ce77fcd2 # v9

.github/workflows/codeql.yml

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

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v6
42+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4343

4444
- name: Mark repo as safe for git
4545
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
@@ -52,13 +52,13 @@ jobs:
5252
# Initializes the CodeQL tools for scanning.
5353
- if: matrix.language == 'c-cpp'
5454
name: Initialize CodeQL C
55-
uses: github/codeql-action/init@v4
55+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
5656
with:
5757
languages: 'c-cpp'
5858

5959
- if: matrix.language == 'python'
6060
name: Initialize CodeQL Python
61-
uses: github/codeql-action/init@v4
61+
uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
6262
with:
6363
languages: 'python'
6464
config-file: ./.github/codeql/codeql-config.yml
@@ -69,6 +69,6 @@ jobs:
6969
ninja -C .build
7070
7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v4
72+
uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4
7373
with:
7474
category: "/language:${{matrix.language}}"

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
container:
1515
image: ghcr.io/linux-nvme/debian.python:latest
1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
- name: Mark repo as safe for git
1919
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2020
- name: build
2121
run: |
2222
scripts/build.sh coverage
23-
- uses: codecov/codecov-action@v5
23+
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
2424
with:
2525
token: ${{ secrets.CODECOV_TOKEN }}
2626
fail_ci_if_error: false

.github/workflows/coverity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
container:
2121
image: ghcr.io/linux-nvme/debian.python:latest
2222
steps:
23-
- uses: actions/checkout@v6
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
with:
2525
ref: ${{ github.event.inputs.ref || github.ref }}
2626
fetch-depth: 0
@@ -67,7 +67,7 @@ jobs:
6767
--form description="Automated Coverity Scan from ${{ github.event_name }}" \
6868
https://scan.coverity.com/builds?project=linux-nvme%2Fnvme-cli
6969
70-
- uses: actions/upload-artifact@v5
70+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7171
name: upload coverity artifacts
7272
if: failure()
7373
with:

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
container:
2121
image: ghcr.io/linux-nvme/debian:latest
2222
steps:
23-
- uses: actions/checkout@v6
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
- name: Mark repo as safe for git
2525
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2626
- name: build

.github/workflows/libnvme-release-python.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
container:
2222
image: ghcr.io/linux-nvme/debian.python:latest
2323
steps:
24-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525

2626
- name: Allow workspace
2727
run: |
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
pipx run twine check dist/*.tar.gz
3737
38-
- uses: actions/upload-artifact@v6
38+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
3939
with:
4040
path: dist/*.tar.gz
4141
retention-days: 5
@@ -49,7 +49,7 @@ jobs:
4949
image: ghcr.io/linux-nvme/debian.python:latest
5050
steps:
5151
- name: Check out repository (with tags)
52-
uses: actions/checkout@v6
52+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5353
with:
5454
fetch-depth: 0 # Required for `git describe`
5555

@@ -93,7 +93,7 @@ jobs:
9393
run: |
9494
pipx run twine check dist/*.tar.gz
9595
96-
- uses: actions/upload-artifact@v6
96+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
9797
with:
9898
name: test_pypi
9999
path: dist/*.tar.gz
@@ -109,13 +109,13 @@ jobs:
109109
id-token: write
110110
if: github.repository == 'linux-nvme/nvme-cli'
111111
steps:
112-
- uses: actions/download-artifact@v7
112+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
113113
with:
114114
name: test_pypi
115115
path: dist
116116

117117
- name: Publish package to TestPyPI
118-
uses: pypa/[email protected]
118+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
119119
with:
120120
repository-url: https://test.pypi.org/legacy/
121121

@@ -137,12 +137,12 @@ jobs:
137137
fi
138138
139139
- name: Download artifiact
140-
uses: actions/download-artifact@v7
140+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
141141
if: steps.check-tag.outputs.match == 'true'
142142
with:
143143
name: artifact
144144
path: dist
145145

146146
- name: Publish package to PyPI
147-
uses: pypa/[email protected]
147+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
148148
if: steps.check-tag.outputs.match == 'true'

.github/workflows/libnvme-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
permissions:
1515
contents: write
1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
- name: Mark repo as safe for git
1919
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
20-
- uses: ncipollo/release-action@v1
20+
- uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
permissions:
1515
contents: write
1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818
- name: Mark repo as safe for git
1919
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
20-
- uses: ncipollo/release-action@v1
20+
- uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
2121
with:
2222
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/run-nightly-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'linux-nvme/nvme-cli' }}
1212
runs-on: arc-vm-nvme-cli
1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
with:
1616
repository: "linux-blktests/blktests-ci"
1717
#We don't have to build the kernel here, as we have a cron job running on

0 commit comments

Comments
 (0)