Skip to content

Commit 0c1421a

Browse files
authored
ci(template): Harden workflows (#600)
* ci(template): Fix superfluous-actions audit * ci(template): Fix excessive-permissions audits
1 parent 987c507 commit 0c1421a

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

template/.github/workflows/build.yaml.j2

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ jobs:
8383
submodules: recursive
8484

8585
- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} toolchain
86-
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
87-
with:
88-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
86+
shell: bash
87+
run: rustup toolchain install "RUST_TOOLCHAIN_VERSION"
8988

9089
- name: Setup Rust Cache
9190
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
@@ -160,9 +159,8 @@ jobs:
160159
uses: cachix/install-nix-action@fc6e360bedc9ee72d75e701397f0bb30dce77568 # v31.5.2
161160

162161
- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} Toolchain
163-
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
164-
with:
165-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
162+
shell: bash
163+
run: rustup toolchain install "RUST_TOOLCHAIN_VERSION"
166164

167165
- name: Build Container Image
168166
id: build

template/.github/workflows/integration-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ on:
2323
test:
2424
description: Name of the test. Only used of test-mode is `custom`
2525

26+
permissions: {}
27+
2628
jobs:
2729
test:
2830
name: Run Integration Test

template/.github/workflows/pr_prek.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ on:
55
pull_request:
66
merge_group:
77

8+
permissions: {}
9+
810
env:
911
CARGO_TERM_COLOR: always
1012
NIX_PKG_MANAGER_VERSION: "{[ nix_pkg_manager_version }]"
1113
RUST_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]"
1214
HADOLINT_VERSION: "{[ hadolint_version }]"
13-
PYTHON_VERSION: "{[ python_version }]"
1415
JINJA2_CLI_VERSION: "{[ jinja2_cli_version }]"
1516

1617
jobs:
@@ -29,7 +30,6 @@ jobs:
2930
fetch-depth: 0
3031
- uses: stackabletech/actions/run-prek@a14cbd08d9e034e2361ea9205b32aff0491885db # v0.15.0
3132
with:
32-
python-version: ${{ env.PYTHON_VERSION }}
3333
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
3434
hadolint: ${{ env.HADOLINT_VERSION }}
3535
nix: ${{ env.NIX_PKG_MANAGER_VERSION }}

0 commit comments

Comments
 (0)