Skip to content

Add zizmor github actions security analysis workflow #1813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on: [push, pull_request]

name: Code Coverage

permissions: {}

jobs:
Codecov:
name: Code Coverage
Expand All @@ -26,7 +28,7 @@ jobs:
profile: minimal
components: llvm-tools-preview
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Test
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on: [push, pull_request]

name: CI

permissions: {}

jobs:

prepare:
Expand Down Expand Up @@ -43,7 +45,7 @@ jobs:
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Pin dependencies for 1.75
if: matrix.rust.version == '1.75.0'
run: |
Expand Down Expand Up @@ -84,7 +86,7 @@ jobs:
profile: minimal
# target: "thumbv6m-none-eabi"
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Check bdk_chain
working-directory: ./crates/chain
# TODO "--target thumbv6m-none-eabi" should work but currently does not
Expand Down Expand Up @@ -118,7 +120,7 @@ jobs:
profile: minimal
target: "wasm32-unknown-unknown"
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Check esplora
working-directory: ./crates/esplora
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async
Expand Down Expand Up @@ -158,7 +160,7 @@ jobs:
components: clippy
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -188,7 +190,7 @@ jobs:
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Build
working-directory: examples/${{ matrix.example-dir }}
run: cargo build
3 changes: 3 additions & 0 deletions .github/workflows/cron-update-rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Update rust version

permissions: {}

on:
schedule:
- cron: "0 0 15 * *" # At 00:00 on day-of-month 15.
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Zizmor Actions Analysis

on:
push:
branches: ["master"]
pull_request:
branches: ["**"]

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Rust Cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6

- name: Install zizmor
run: cargo install zizmor --locked --version 1.6.0

- name: Run zizmor 🌈
run: zizmor --format sarif . > results.sarif
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
category: zizmor
Loading