Skip to content

Commit aeced63

Browse files
committed
chore: Add zizmor to pre-commit and github actions
Zizmor is tool that analyzes github actions and checks for security vulnerabilities. Running it as part of pre-commit, and part of CI, will help ensure that we don't accidentally make changes that lead to a security vulnerability.
1 parent 3a2ce2f commit aeced63

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/zizmor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: GitHub Actions Security Analysis
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: ["**"]
8+
9+
permissions: {}
10+
11+
jobs:
12+
zizmor:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
security-events: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
21+
22+
- name: Run zizmor
23+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ repos:
6363
entry: "\\.(lstrip|rstrip)\\([\"'][^\"']{2,}[\"']\\)"
6464
types: [python]
6565
files: ^(src|tests)/
66+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
67+
rev: v1.23.1
68+
hooks:
69+
- id: zizmor
6670
- repo: https://github.com/twisted/towncrier
6771
rev: 25.8.0
6872
hooks:

0 commit comments

Comments
 (0)