Skip to content

Commit 661c73c

Browse files
ci: pin GitHub Actions to commit SHAs
Replace all mutable action/reusable-workflow tag references in the workflows with the immutable commit SHA they currently resolve to, keeping the original version as a trailing comment for readability and future bumps. This hardens the CI supply chain against tag-mutation attacks (per GitHub's hardening guidance). Covers third-party actions (actions/*, astral-sh/setup-uv, codecov/codecov-action, peter-evans/create-pull-request, mikepenz/release-changelog-builder-action, github/codeql-action, crate-ci/typos) and the NVIDIA-NeMo/FW-CI-templates reusable workflows. Local ./.github reusable-workflow references are unchanged (not tags). Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
1 parent 416a0a7 commit 661c73c

16 files changed

Lines changed: 30 additions & 30 deletions

.github/workflows/changelog-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout branch
25-
uses: actions/checkout@v6
25+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
2626
with:
2727
ref: main
2828
fetch-depth: 0
2929

3030
- name: Build Changelog
3131
id: github_tag
32-
uses: mikepenz/release-changelog-builder-action@v3.3.1
32+
uses: mikepenz/release-changelog-builder-action@000e44613cdb6c340ac98cb1582f99e8d3230058 # v3.3.1
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535
with:
@@ -80,7 +80,7 @@ jobs:
8080
run: cat CHANGELOG.md
8181

8282
- name: Create or update label
83-
uses: actions/github-script@v8
83+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
8484
with:
8585
script: |
8686
const labelName = '${{ inputs.release-branch }}';
@@ -112,7 +112,7 @@ jobs:
112112
}
113113
114114
- name: Create Pull Request
115-
uses: peter-evans/create-pull-request@v7
115+
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
116116
with:
117117
commit-message: "beep boop: Update changelog"
118118
title: "Update changelog for `${{ inputs.release-branch }}`"

.github/workflows/cherry-pick-release-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
cherry-pick:
10-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cherry_pick.yml@v0.63.0
10+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cherry_pick.yml@8ebb3aec4c246c944a25adc7b09107cbd6a76976 # v0.63.0
1111
secrets:
1212
PAT: ${{ secrets.PAT }}
1313
SLACK_WEBHOOK_ADMIN: ${{ secrets.SLACK_WEBHOOK_ADMIN }}

.github/workflows/close-inactive-issue-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ on:
55

66
jobs:
77
close-issues:
8-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_close_inactive_issue_pr.yml@v0.44.0
8+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_close_inactive_issue_pr.yml@9e07489b8a6bc533c8792099b012c588f4430298 # v0.44.0

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v6
41+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -57,7 +57,7 @@ jobs:
5757
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5858
# If this step fails, then you should remove it and run the build manually (see below)
5959
- name: Autobuild
60-
uses: github/codeql-action/autobuild@v2
60+
uses: github/codeql-action/autobuild@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
6161

6262
# ℹ️ Command-line programs to run using the OS shell.
6363
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -70,6 +70,6 @@ jobs:
7070
# ./location_of_script_within_repo/buildscript.sh
7171

7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v2
73+
uses: github/codeql-action/analyze@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
7474
with:
7575
category: "/language:${{matrix.language}}"

.github/workflows/community-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
community-bot:
11-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_community_bot.yml@v0.54.4
11+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_community_bot.yml@a8006e87bff5bce54336c3e1e8571563ac70d88e # v0.54.4
1212
with:
1313
community_project_id: ${{ vars.COMMUNITY_PROJECT_ID }}
1414
secrets:

.github/workflows/copyright-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ on:
2020

2121
jobs:
2222
copyright-check:
23-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_copyright_check.yml@v0.54.4
23+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_copyright_check.yml@a8006e87bff5bce54336c3e1e8571563ac70d88e # v0.54.4

.github/workflows/detect-secrets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ on:
1818

1919
jobs:
2020
secrets-detector:
21-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_secrets-detector.yml@v0.74.0
21+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_secrets-detector.yml@859ae21dd5588c87e3bde499ddab7a3025773e8d # v0.74.0

.github/workflows/install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
os: [ubuntu-latest, macos-latest, ubuntu-22.04-arm]
1717
python: ["3.10", "3.11", "3.12"]
1818
steps:
19-
- uses: actions/checkout@v6
19+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
2020

2121
- name: Setup Python
22-
uses: actions/setup-python@v6
22+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
2323
with:
2424
python-version: "${{ matrix.python }}"
2525

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
runs-on: ubuntu-latest
1818
needs: [format, lint, test]
1919
steps:
20-
- uses: actions/checkout@v6
20+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
2121

2222
- name: Create nightly tag
23-
uses: actions/github-script@v8
23+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
2424
with:
2525
script: |
2626
// Delete existing nightly tag if it exists

.github/workflows/release-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ on:
7878

7979
jobs:
8080
build-docs:
81-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.67.0
81+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@3ab507cd035df3ae37cce8808ed3210ff6e7062b # v0.67.0
8282
with:
8383
ref: ${{ inputs.github-ref }}
8484

8585
publish-docs:
8686
runs-on: ubuntu-latest
8787
needs: [build-docs]
8888
steps:
89-
- uses: actions/checkout@v6
89+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
9090
with:
9191
repository: NVIDIA-NeMo/FW-CI-templates
9292
ref: v0.74.0

0 commit comments

Comments
 (0)