Skip to content

Commit 3826326

Browse files
authored
ci: Harden workflows (#450)
* CI: Hardening * Bump h2 to fix rustsec advisory * CI: Remove cosign v2 pin * CI: Add fork guard for manifest list * CI: Migrate to Prek and move jobs to precommit
1 parent d2ee5e8 commit 3826326

10 files changed

Lines changed: 146 additions & 344 deletions
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: Security audit
3+
permissions: {}
34

45
on:
56
schedule:
@@ -8,9 +9,16 @@ on:
89

910
jobs:
1011
audit:
12+
name: Audit
1113
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
checks: write # rustsec/audit-check reports findings as a check run
17+
issues: write # rustsec/audit-check opens/updates issues for new advisories
1218
steps:
13-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
14-
- uses: actions-rs/audit-check@35b7b53b1e25b55642157ac01b4adceb5b9ebef3 # renovate: tag=v1.2.0
19+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20+
with:
21+
persist-credentials: false
22+
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
1523
with:
1624
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr_cockpit.yml

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/workflows/pr_docs.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/pr_general.yml

Lines changed: 0 additions & 115 deletions
This file was deleted.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
---
2-
name: pre-commit
2+
name: prek
33

44
on:
55
pull_request:
66
merge_group:
77

8+
permissions: {}
9+
810
env:
911
CARGO_TERM_COLOR: always
1012
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
1113
HADOLINT_VERSION: "v1.17.6"
1214
NIX_VERSION: "2.25.2"
1315

1416
jobs:
15-
pre-commit:
17+
prek:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1921
with:
22+
persist-credentials: false
2023
fetch-depth: 0
21-
- uses: stackabletech/actions/run-pre-commit@5901c3b1455488820c4be367531e07c3c3e82538 # v0.4.0
24+
- uses: stackabletech/actions/run-prek@0fe048f952bee522474903a925ea48dc706a0bb4 # v0.17.5
2225
with:
2326
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
2427
hadolint: ${{ env.HADOLINT_VERSION }}

0 commit comments

Comments
 (0)