Skip to content

Commit ac8c443

Browse files
committed
ci: Harden workflows
1 parent c1c64f5 commit ac8c443

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ env:
2222
RUSTDOCFLAGS: "-D warnings"
2323
RUST_LOG: "info"
2424

25+
permissions: {}
26+
2527
jobs:
2628
# Identify unused dependencies
2729
run_udeps:
@@ -31,6 +33,8 @@ jobs:
3133
RUSTC_BOOTSTRAP: 1
3234
steps:
3335
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
persist-credentials: false
3438
- uses: dtolnay/rust-toolchain@master
3539
with:
3640
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -54,6 +58,8 @@ jobs:
5458

5559
steps:
5660
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
persist-credentials: false
5763
- uses: EmbarkStudios/cargo-deny-action@0484eedcba649433ebd03d9b7c9c002746bbc4b9 # v2.0.6
5864
with:
5965
command: check ${{ matrix.checks }}
@@ -63,6 +69,8 @@ jobs:
6369
runs-on: ubuntu-latest
6470
steps:
6571
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
with:
73+
persist-credentials: false
6674
- uses: dtolnay/rust-toolchain@master
6775
with:
6876
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -82,6 +90,7 @@ jobs:
8290
sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
8391
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8492
with:
93+
persist-credentials: false
8594
submodules: recursive
8695
- uses: dtolnay/rust-toolchain@master
8796
with:
@@ -113,6 +122,8 @@ jobs:
113122
runs-on: ubuntu-latest
114123
steps:
115124
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
125+
with:
126+
persist-credentials: false
116127
- uses: dtolnay/rust-toolchain@master
117128
with:
118129
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
@@ -131,6 +142,8 @@ jobs:
131142
runs-on: ubuntu-latest
132143
steps:
133144
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
145+
with:
146+
persist-credentials: false
134147
- uses: dtolnay/rust-toolchain@master
135148
with:
136149
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}

.github/workflows/daily_security.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
- cron: '15 4 * * *'
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
audit:
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1418
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
1519
with:
1620
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr_pre-commit.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ on:
77
env:
88
CARGO_TERM_COLOR: always
99
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
10-
HADOLINT_VERSION: "v1.17.6"
10+
11+
permissions: {}
1112

1213
jobs:
1314
pre-commit:
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1718
with:
19+
persist-credentials: false
1820
fetch-depth: 0
1921
- uses: stackabletech/actions/run-pre-commit@2d3d7ddad981ae09901d45a0f6bf30c2658b1b78 # v0.7.0
2022
with:

.github/workflows/publish-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ on:
1515
env:
1616
RUST_TOOLCHAIN_VERSION: "1.82.0"
1717

18+
permissions: {}
19+
1820
jobs:
1921
build-docs:
2022
runs-on: ubuntu-latest
2123
steps:
2224
- name: Checkout Repository
2325
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
2428

2529
- uses: dtolnay/rust-toolchain@master
2630
with:

0 commit comments

Comments
 (0)