Skip to content

Commit bbc94d0

Browse files
authored
Pin SHA of third-party GitHub Actions (#923)
The full-version Git tags used by Actions are mutable (as seen in recent events in the wider GitHub Actions community), so pinning third-party Actions to a SHA is recommended: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions The version tag has been added after the pin as a comment (as a readability aid) in a format that Dependabot will keep up to date: dependabot/dependabot-core#4691 I've also enabled Dependabot grouping for GitHub Actions updates to reduce PR noise. GUS-W-18051077.
1 parent b7c08cc commit bbc94d0

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ updates:
2020
- "dependencies"
2121
- "github actions"
2222
- "skip changelog"
23+
groups:
24+
github-actions:
25+
update-types:
26+
- "minor"
27+
- "patch"

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# which include the latest stable release of Rust, Rustup, Clippy and rustfmt.
2525
run: rustup update
2626
- name: Rust Cache
27-
uses: Swatinem/[email protected]
27+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
2828
- name: Clippy
2929
# Using --all-targets so tests are checked and --deny to fail on warnings.
3030
# Not using --locked here and below since Cargo.lock is in .gitignore.
@@ -44,7 +44,7 @@ jobs:
4444
- name: Update Rust toolchain
4545
run: rustup update
4646
- name: Rust Cache
47-
uses: Swatinem/[email protected]
47+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
4848
- name: Run unit tests
4949
run: cargo test --all-features
5050

@@ -60,9 +60,9 @@ jobs:
6060
- name: Install Rust linux-musl target
6161
run: rustup target add x86_64-unknown-linux-musl
6262
- name: Rust Cache
63-
uses: Swatinem/[email protected]
63+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
6464
- name: Install Pack CLI
65-
uses: buildpacks/github-actions/[email protected].8
65+
uses: buildpacks/github-actions/setup-pack@0f05ba41fb74d56ab4cb27485f538a8d65b4122e # v5.8.9
6666
- name: Run integration tests
6767
# Runs only tests annotated with the `ignore` attribute (which in this repo, are the integration tests).
6868
run: cargo test -- --ignored

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: rustup update
4545

4646
- name: Rust Cache
47-
uses: Swatinem/[email protected]
47+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
4848

4949
- name: Install cargo-edit
5050
run: cargo install cargo-edit
@@ -82,7 +82,7 @@ jobs:
8282

8383
- name: Create pull request
8484
id: pr
85-
uses: peter-evans/[email protected].7
85+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
8686
with:
8787
token: ${{ steps.generate-token.outputs.token }}
8888
title: Prepare release v${{ steps.new-version.outputs.version }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: rustup update
3434

3535
- name: Rust Cache
36-
uses: Swatinem/[email protected]
36+
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
3737

3838
- name: Install cargo-release
3939
run: cargo install cargo-release
@@ -70,7 +70,7 @@ jobs:
7070
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
7171

7272
- name: Create GitHub Release
73-
uses: softprops/[email protected]
73+
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
7474
with:
7575
token: ${{ steps.generate-token.outputs.token }}
7676
tag_name: v${{ steps.new-version.outputs.version }}

0 commit comments

Comments
 (0)