Skip to content

Commit c3b24ea

Browse files
Enable zizmor in github actions
Also add fixes to actions from zizmor runs. Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent fa15c37 commit c3b24ea

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/docs-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CI Documentation
22

33
on: [push, pull_request]
44

5+
permissions: {}
56
jobs:
67
build:
78
runs-on: ubuntu-24.04
@@ -14,6 +15,8 @@ jobs:
1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
18+
with:
19+
persist-credentials: false
1720

1821
- name: Set up Python ${{ matrix.python-version }}
1922
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405

.github/workflows/pypi-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ on:
1818
tags:
1919
- "v*.*.*"
2020

21+
permissions: {}
2122
jobs:
2223
build-pypi-distribs:
2324
name: Build and publish library to PyPI
2425
runs-on: ubuntu-24.04
2526

2627
steps:
2728
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
29+
with:
30+
persist-credentials: false
2831
- name: Set up Python
2932
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3033
with:

.github/workflows/zizmor.yml

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

0 commit comments

Comments
 (0)