Skip to content

Commit 391fc02

Browse files
authored
chore(security): pin external GitHub Actions to commit SHAs (#276)
Pin external third-party actions to full-length commit SHAs with a trailing version comment to mitigate mutable-tag supply-chain attacks. Internal SecureAuthCorp/* references intentionally left on floating tags. No functional change: each SHA resolves to the commit the existing tag points to. DEVOPS-8397
1 parent 7deda4e commit 391fc02

6 files changed

Lines changed: 23 additions & 23 deletions

File tree

.github/workflows/extract.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
validate:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v7
20+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2121

22-
- uses: actions/setup-node@v6
22+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2323
with:
2424
node-version: "22"
2525

@@ -55,9 +55,9 @@ jobs:
5555
permissions:
5656
contents: write
5757
steps:
58-
- uses: actions/checkout@v7
58+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
5959

60-
- uses: actions/setup-node@v6
60+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
6161
with:
6262
node-version: "22"
6363

.github/workflows/test-android.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.find.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v7
27+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2828
# Default shallow checkout — we only need the working tree for `find`
2929
# below, not git history. The PR's changed files come from gh api.
3030
- id: find
@@ -81,10 +81,10 @@ jobs:
8181
matrix:
8282
android_dir: ${{ fromJson(needs.find-projects.outputs.matrix) }}
8383
steps:
84-
- uses: actions/checkout@v7
84+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
8585

8686
- name: Set up JDK 17
87-
uses: actions/setup-java@v5
87+
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
8888
with:
8989
distribution: "temurin"
9090
java-version: "17"
@@ -129,7 +129,7 @@ jobs:
129129
# React Native samples need their JS deps installed first so autolinking
130130
# can resolve native modules from node_modules. Detect by walking up to
131131
# the directory that owns package.json.
132-
- uses: actions/setup-node@v6
132+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
133133
with:
134134
node-version: "22"
135135
- name: Enable Corepack
@@ -160,7 +160,7 @@ jobs:
160160
-dname "CN=Android Debug,O=Android,C=US"
161161
162162
- name: Cache Gradle
163-
uses: actions/cache@v5
163+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
164164
with:
165165
path: |
166166
~/.gradle/caches

.github/workflows/test-dotnet.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.find.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v7
27+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2828
# Default shallow checkout — we only need the working tree for `find`
2929
# below, not git history. The PR's changed files come from gh api.
3030
- id: find
@@ -65,8 +65,8 @@ jobs:
6565
matrix:
6666
project: ${{ fromJson(needs.find-projects.outputs.matrix) }}
6767
steps:
68-
- uses: actions/checkout@v7
69-
- uses: actions/setup-dotnet@v5
68+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
69+
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5
7070
with:
7171
dotnet-version: "10.0.x"
7272
- name: Restore

.github/workflows/test-ios.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
outputs:
2222
matrix: ${{ steps.find.outputs.matrix }}
2323
steps:
24-
- uses: actions/checkout@v7
24+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2525
- id: find
2626
env:
2727
EVENT_NAME: ${{ github.event_name }}
@@ -79,7 +79,7 @@ jobs:
7979
matrix:
8080
project: ${{ fromJson(needs.find-projects.outputs.matrix) }}
8181
steps:
82-
- uses: actions/checkout@v7
82+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
8383

8484
- name: Detect project type
8585
id: type
@@ -99,7 +99,7 @@ jobs:
9999
# Cache the SPM source archives so cold resolves stay fast.
100100
- name: Cache SwiftPM (native iOS)
101101
if: steps.type.outputs.type == 'native'
102-
uses: actions/cache@v5
102+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
103103
with:
104104
path: |
105105
~/Library/Caches/org.swift.swiftpm
@@ -117,7 +117,7 @@ jobs:
117117
# must be installed first.
118118
- name: Set up Node (RN iOS)
119119
if: steps.type.outputs.type == 'rn'
120-
uses: actions/setup-node@v6
120+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
121121
with:
122122
node-version: "22"
123123
- name: Enable Corepack (RN iOS)
@@ -139,7 +139,7 @@ jobs:
139139
# the right Pods/ for the matrix entry's Podfile.lock.
140140
- name: Cache CocoaPods (RN iOS)
141141
if: steps.type.outputs.type == 'rn'
142-
uses: actions/cache@v5
142+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
143143
with:
144144
path: ~/Library/Caches/CocoaPods
145145
key: pods-${{ runner.os }}-${{ hashFiles(format('{0}/Podfile.lock', matrix.project)) }}

.github/workflows/test-java.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.find.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v7
27+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2828
# Default shallow checkout — we only need the working tree for `find`
2929
# below, not git history. The PR's changed files come from gh api.
3030
- id: find
@@ -65,8 +65,8 @@ jobs:
6565
matrix:
6666
project: ${{ fromJson(needs.find-projects.outputs.matrix) }}
6767
steps:
68-
- uses: actions/checkout@v7
69-
- uses: actions/setup-java@v5
68+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
69+
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5
7070
with:
7171
distribution: "temurin"
7272
java-version: "21"

.github/workflows/test-js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
matrix: ${{ steps.find.outputs.matrix }}
2626
steps:
27-
- uses: actions/checkout@v7
27+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
2828
# Default shallow checkout — we only need the working tree for `find`
2929
# below, not git history. The PR's changed files come from gh api.
3030
- id: find
@@ -71,8 +71,8 @@ jobs:
7171
matrix:
7272
project: ${{ fromJson(needs.find-projects.outputs.matrix) }}
7373
steps:
74-
- uses: actions/checkout@v7
75-
- uses: actions/setup-node@v6
74+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
75+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
7676
with:
7777
node-version: "22"
7878
- name: Enable Corepack

0 commit comments

Comments
 (0)