mirror of
https://github.com/element-hq/synapse.git
synced 2025-04-09 00:33:58 +00:00
Add CI workflow to run Zizmor to check for GitHub Actions security issues
This commit is contained in:
parent
47e295bf3a
commit
207fdaf803
1 changed files with 43 additions and 0 deletions
43
.github/workflows/zizmor.yaml
vendored
Normal file
43
.github/workflows/zizmor.yaml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: GitHub Actions security check (zizmor)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- .github/workflows/**
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
paths:
|
||||
- .github/workflows/**
|
||||
|
||||
jobs:
|
||||
zizmor:
|
||||
name: zizmor latest via PyPI
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
contents: read # only needed for private repos
|
||||
actions: read # only needed for private repos
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Run zizmor
|
||||
run: uvx 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…
Add table
Reference in a new issue