Skip to content

Add Zizmor security workflow to enhance project security posture #199

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

Merged
merged 9 commits into from
Mar 15, 2025
55 changes: 55 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Zizmor GitHub Actions Security Analysis

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# Run weekly
- cron: '0 0 * * 0'
workflow_dispatch:

permissions:
contents: read

jobs:
zizmor-analysis:
name: Zizmor Analysis
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install Zizmor
run: |
cargo install zizmor

- name: Run Zizmor analysis
run: |
zizmor --sarif results.sarif .github/workflows/

- name: Upload analysis results
uses: actions/upload-artifact@v4
with:
name: zizmor-results
path: results.sarif
retention-days: 7

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Loading