Skip to content

Commit be8fc71

Browse files
committed
ci: add zizmor github actions security analysis workflow
1 parent 3e61d2a commit be8fc71

File tree

4 files changed

+48
-6
lines changed

4 files changed

+48
-6
lines changed

.github/workflows/code_coverage.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ on: [push, pull_request]
22

33
name: Code Coverage
44

5+
permissions: {}
6+
57
jobs:
68
Codecov:
79
name: Code Coverage
@@ -26,7 +28,7 @@ jobs:
2628
profile: minimal
2729
components: llvm-tools-preview
2830
- name: Rust Cache
29-
uses: Swatinem/rust-cache@v2.7.7
31+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
3032
- name: Install grcov
3133
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
3234
- name: Test

.github/workflows/cont_integration.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ on: [push, pull_request]
22

33
name: CI
44

5+
permissions: {}
6+
57
jobs:
68

79
prepare:
@@ -42,7 +44,7 @@ jobs:
4244
override: true
4345
profile: minimal
4446
- name: Rust Cache
45-
uses: Swatinem/rust-cache@v2.7.7
47+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
4648
- name: Pin dependencies for MSRV
4749
if: matrix.rust.version == '1.63.0'
4850
run: ./ci/pin-msrv.sh
@@ -70,7 +72,7 @@ jobs:
7072
profile: minimal
7173
# target: "thumbv6m-none-eabi"
7274
- name: Rust Cache
73-
uses: Swatinem/rust-cache@v2.7.7
75+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
7476
- name: Check bdk wallet
7577
working-directory: ./wallet
7678
# TODO "--target thumbv6m-none-eabi" should work but currently does not
@@ -100,7 +102,7 @@ jobs:
100102
profile: minimal
101103
target: "wasm32-unknown-unknown"
102104
- name: Rust Cache
103-
uses: Swatinem/rust-cache@v2.7.7
105+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
104106
- name: Check bdk wallet
105107
working-directory: ./wallet
106108
run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
@@ -140,7 +142,7 @@ jobs:
140142
components: clippy
141143
override: true
142144
- name: Rust Cache
143-
uses: Swatinem/rust-cache@v2.7.7
145+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
144146
- uses: actions-rs/clippy-check@v1
145147
with:
146148
token: ${{ secrets.GITHUB_TOKEN }}
@@ -170,7 +172,7 @@ jobs:
170172
override: true
171173
profile: minimal
172174
- name: Rust Cache
173-
uses: Swatinem/rust-cache@v2.7.7
175+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
174176
- name: Build
175177
working-directory: examples/${{ matrix.example-dir }}
176178
run: cargo build

.github/workflows/cron-update-rust.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Update rust version
2+
3+
permissions: {}
4+
25
on:
36
schedule:
47
- cron: "0 0 15 * *" # At 00:00 on day-of-month 15.

.github/workflows/zizmor.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Zizmor Actions Analysis
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
zizmor:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
security-events: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
20+
- name: Rust Cache
21+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
22+
23+
- name: Install zizmor
24+
run: cargo install zizmor --locked --version 1.6.0
25+
26+
- name: Run zizmor 🌈
27+
run: zizmor --format sarif . > results.sarif
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Upload SARIF file
32+
uses: github/codeql-action/upload-sarif@v3
33+
with:
34+
sarif_file: results.sarif
35+
category: zizmor

0 commit comments

Comments
 (0)