Skip to content
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

Add zizmor github actions security analysis workflow #1813

Open
wants to merge 2 commits 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
2 changes: 2 additions & 0 deletions .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 Down
2 changes: 2 additions & 0 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
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
2 changes: 2 additions & 0 deletions .github/workflows/nightly_docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Publish Nightly Docs

permissions: {}

on: [push, pull_request]

jobs:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: GitHub Actions Security Analysis with zizmor 🌈

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

jobs:
zizmor:
name: zizmor latest via PyPI
runs-on: ubuntu-latest
permissions:
security-events: write
# required for workflows in private repositories
contents: read
actions: read
Comment on lines +16 to +17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a public repo, this could be removed ?

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 }}
Comment on lines +24 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having a zizmor job, however, I'm wondering if there's another simpler/safer way to run it, instead of bringing this new action (setup-uv) AFAICT just for the python package manager 🤔


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