From: Steve Myers Date: Tue, 28 Jan 2025 02:19:30 +0000 (-0600) Subject: ci: add zizmor github actions security analysis workflow X-Git-Tag: core-0.6.0~5^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/struct.BlockHash.html?a=commitdiff_plain;h=a50fa4c1014ad0739f2ca4d51738b1f1207d679f;p=bdk ci: add zizmor github actions security analysis workflow --- diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index c768ee44..618e5dc0 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -2,6 +2,8 @@ on: [push, pull_request] name: Code Coverage +permissions: {} + jobs: Codecov: name: Code Coverage diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 432433a7..f4ad6114 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -2,6 +2,8 @@ on: [push, pull_request] name: CI +permissions: {} + jobs: prepare: diff --git a/.github/workflows/cron-update-rust.yml b/.github/workflows/cron-update-rust.yml index 2fc212eb..1264203d 100644 --- a/.github/workflows/cron-update-rust.yml +++ b/.github/workflows/cron-update-rust.yml @@ -1,4 +1,7 @@ name: Update rust version + +permissions: {} + on: schedule: - cron: "0 0 15 * *" # At 00:00 on day-of-month 15. diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 00000000..0c2aa080 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -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 \ No newline at end of file