Skip to content

Commit 5a97e6b

Browse files
authored
Merge pull request #1486 from github/ismith/actions-pinning
Pin 3rd-party GitHub Actions to commit hashes to avoid supply chain attacks
2 parents 2be9555 + d7f6847 commit 5a97e6b

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
- uses: actions/checkout@v6
3333
with:
3434
persist-credentials: false
35-
- uses: extractions/setup-just@v3
35+
# e33e0265a09d6d736e2ee1e0eb685ef1de4669ff is tag v3, pinned to avoid supply chain attacks
36+
- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff
3637
- name: Initialize CodeQL
3738
if: matrix.runner-os == 'ubuntu-latest'
3839
uses: github/codeql-action/init@v4
@@ -63,7 +64,8 @@ jobs:
6364
run: cp coverage/**/coverage.cobertura.xml coverage/coverage.cobertura.xml
6465

6566
- name: Code Coverage Summary Report
66-
uses: irongut/[email protected]
67+
# 51cc3a756ddcd398d447c044c02cb6aa83fdae95 is tag v1.3.0, pinned to avoid supply chain attacks
68+
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95
6769
if: always() && matrix.runner-os == 'ubuntu-latest' && matrix.language == 'csharp'
6870
with:
6971
filename: coverage/coverage.cobertura.xml
@@ -118,7 +120,8 @@ jobs:
118120
- uses: actions/checkout@v6
119121
with:
120122
persist-credentials: false
121-
- uses: extractions/setup-just@v3
123+
# e33e0265a09d6d736e2ee1e0eb685ef1de4669ff is tag v3, pinned to avoid supply chain attacks
124+
- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff
122125

123126
- name: Setup .NET
124127
uses: actions/setup-dotnet@v5
@@ -266,7 +269,8 @@ jobs:
266269
run: dotnet test src/OctoshiftCLI.IntegrationTests/OctoshiftCLI.IntegrationTests.csproj --filter "${{ matrix.source-vcs }}ToGithub" --logger:"junit;LogFilePath=integration-tests.xml" --logger "console;verbosity=normal" /p:VersionPrefix=9.9
267270

268271
- name: Publish Integration Test Results
269-
uses: EnricoMi/publish-unit-test-result-action@v2
272+
# 6e8f8c55b476f977d1c58cfbd7e337cbf86d917f is tag v2, pinned to avoid supply chain attacks
273+
uses: EnricoMi/publish-unit-test-result-action@6e8f8c55b476f977d1c58cfbd7e337cbf86d917f
270274
if: always() && matrix.runner-os == 'ubuntu-latest' && github.actor != 'dependabot[bot]'
271275
with:
272276
files: "**/*-tests.xml"
@@ -333,7 +337,8 @@ jobs:
333337
CLI_VERSION: ${{ github.ref }}
334338

335339
- name: Create gh-gei Release
336-
uses: softprops/action-gh-release@v2
340+
# a06a81a03ee405af7f2048a818ed3f03bbf83c7b is tag v2, pinned to avoid supply chain attacks
341+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
337342
with:
338343
body_path: ./RELEASENOTES.md
339344
files: |
@@ -349,7 +354,8 @@ jobs:
349354
./dist/osx-x64/gei-darwin-amd64
350355
351356
- name: Create gh-ado2gh Release
352-
uses: softprops/action-gh-release@v2
357+
# a06a81a03ee405af7f2048a818ed3f03bbf83c7b is tag v2, pinned to avoid supply chain attacks
358+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
353359
with:
354360
body_path: ./RELEASENOTES.md
355361
repository: github/gh-ado2gh
@@ -362,7 +368,8 @@ jobs:
362368
./dist/osx-x64/ado2gh-darwin-amd64
363369
364370
- name: Create gh-bbs2gh Release
365-
uses: softprops/action-gh-release@v2
371+
# a06a81a03ee405af7f2048a818ed3f03bbf83c7b is tag v2, pinned to avoid supply chain attacks
372+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
366373
with:
367374
body_path: ./RELEASENOTES.md
368375
repository: github/gh-bbs2gh

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ jobs:
203203
run: dotnet test src/OctoshiftCLI.IntegrationTests/OctoshiftCLI.IntegrationTests.csproj --filter "${{ matrix.source-vcs }}ToGithub" --logger:"junit;LogFilePath=integration-tests.xml" --logger "console;verbosity=normal" /p:VersionPrefix=9.9
204204

205205
- name: Publish Integration Test Results
206-
uses: EnricoMi/publish-unit-test-result-action@v2
206+
# 6e8f8c55b476f977d1c58cfbd7e337cbf86d917f is tag v2, pinned to avoid supply chain attacks
207+
uses: EnricoMi/publish-unit-test-result-action@6e8f8c55b476f977d1c58cfbd7e337cbf86d917f
207208
if: always() && matrix.runner-os == 'ubuntu-latest'
208209
with:
209210
files: "**/*-tests.xml"

.github/workflows/publish-test-results.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
sanitized_prnumber=$(grep -E '^[0-9]+$' <<< "$prnumber")
4040
echo "PR_NUMBER=$sanitized_prnumber" >> "$GITHUB_ENV"
4141
- name: Publish Unit Test Results
42-
uses: EnricoMi/publish-unit-test-result-action@v2
42+
# 6e8f8c55b476f977d1c58cfbd7e337cbf86d917f is tag v2, pinned to avoid supply chain attacks
43+
uses: EnricoMi/publish-unit-test-result-action@6e8f8c55b476f977d1c58cfbd7e337cbf86d917f
4344
with:
4445
commit: ${{ github.event.workflow_run.head_sha }}
4546
event_file: artifacts/Event File/event.json
@@ -48,7 +49,8 @@ jobs:
4849
check_name: "Unit Test Results"
4950

5051
- name: Add Coverage PR Comment
51-
uses: marocchino/sticky-pull-request-comment@v2
52+
# 773744901bac0e8cbb5a0dc842800d45e9b2b405 is tag v2, pinned to avoid supply chain attacks
53+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405
5254
with:
5355
recreate: true
5456
path: artifacts/Code Coverage Report/code-coverage-results.md

0 commit comments

Comments
 (0)