Skip to content
61 changes: 61 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SPDX-FileCopyrightText: (C) 2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
---

name: Zizmor Scan

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
zizmor:
permissions:
contents: read
actions: read
security-events: write
runs-on: ubuntu-latest

env:
ZIZMOR_VERSION: 1.20.0

steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false

- name: Run Zizmor
run: |
uvx zizmor=="$ZIZMOR_VERSION" \
--format sarif \
.github \
> zizmor_scan_report.sarif

- name: Upload SARIF to GitHub Security
Comment thread
adimoft marked this conversation as resolved.
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
sarif_file: zizmor_scan_report.sarif

- name: Upload Zizmor report artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: zizmor-results
path: zizmor_scan_report.sarif
retention-days: 7