Skip to content

Commit e618d7b

Browse files
sionsmithclaude
andcommitted
fix: pin GitHub Actions to immutable commit SHAs
Mitigates supply chain attacks via tag mutation (CVE-2025-30066) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e109311 commit e618d7b

3 files changed

Lines changed: 23 additions & 20 deletions

File tree

.github/workflows/auto-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1616
with:
1717
fetch-depth: 2
1818
persist-credentials: false

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
912
env:
1013
CARGO_TERM_COLOR: always
1114
RUSTFLAGS: "-D warnings"
@@ -15,17 +18,17 @@ jobs:
1518
name: Check
1619
runs-on: ubuntu-latest
1720
steps:
18-
- uses: actions/checkout@v4
19-
- uses: dtolnay/rust-toolchain@stable
20-
- uses: Swatinem/rust-cache@v2
21+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
22+
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
23+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
2124
- run: cargo check --all-targets
2225

2326
fmt:
2427
name: Format
2528
runs-on: ubuntu-latest
2629
steps:
27-
- uses: actions/checkout@v4
28-
- uses: dtolnay/rust-toolchain@stable
30+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
31+
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
2932
with:
3033
components: rustfmt
3134
- run: cargo fmt -- --check
@@ -34,11 +37,11 @@ jobs:
3437
name: Clippy
3538
runs-on: ubuntu-latest
3639
steps:
37-
- uses: actions/checkout@v4
38-
- uses: dtolnay/rust-toolchain@stable
40+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
41+
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
3942
with:
4043
components: clippy
41-
- uses: Swatinem/rust-cache@v2
44+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
4245
- run: cargo clippy --all-targets -- -D warnings
4346

4447
test:
@@ -48,7 +51,7 @@ jobs:
4851
matrix:
4952
os: [ubuntu-latest, macos-latest]
5053
steps:
51-
- uses: actions/checkout@v4
52-
- uses: dtolnay/rust-toolchain@stable
53-
- uses: Swatinem/rust-cache@v2
54+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
55+
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
56+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
5457
- run: cargo test --all-targets

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
runner: windows-latest
3535
archive: zip
3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3838

39-
- uses: dtolnay/rust-toolchain@stable
39+
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
4040
with:
4141
targets: ${{ matrix.target }}
4242

43-
- uses: Swatinem/rust-cache@v2
43+
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
4444
with:
4545
key: ${{ matrix.target }}
4646

@@ -74,7 +74,7 @@ jobs:
7474
Compress-Archive -Path target/${{ matrix.target }}/release/teams.exe -DestinationPath teams-${{ github.ref_name }}-${{ matrix.target }}.zip
7575
7676
- name: Upload artifact
77-
uses: actions/upload-artifact@v4
77+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
7878
with:
7979
name: teams-${{ matrix.target }}
8080
path: teams-${{ github.ref_name }}-${{ matrix.target }}.*
@@ -84,10 +84,10 @@ jobs:
8484
needs: build
8585
runs-on: ubuntu-latest
8686
steps:
87-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
8888

8989
- name: Download all artifacts
90-
uses: actions/download-artifact@v4
90+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
9191
with:
9292
path: artifacts
9393
merge-multiple: true
@@ -99,7 +99,7 @@ jobs:
9999
cat checksums-sha256.txt
100100
101101
- name: Create GitHub Release
102-
uses: softprops/action-gh-release@v2
102+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
103103
with:
104104
generate_release_notes: true
105105
files: |
@@ -112,7 +112,7 @@ jobs:
112112
runs-on: ubuntu-latest
113113
steps:
114114
- name: Update homebrew formula
115-
uses: peter-evans/repository-dispatch@v3
115+
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
116116
with:
117117
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
118118
repository: osodevops/homebrew-tap

0 commit comments

Comments
 (0)