Skip to content

Commit 39abd95

Browse files
authored
Merge pull request #1475 from afuetterer/zizmor
ci: fix zizmor findings pre-commit: add zizmor hook in offline mode
2 parents 628fc6b + 91c24b5 commit 39abd95

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ updates:
3030
patterns:
3131
- django*
3232
- drf*
33+
cooldown:
34+
default-days: 7
3335
- package-ecosystem: github-actions
3436
directory: /
3537
schedule:
@@ -44,6 +46,8 @@ updates:
4446
github-actions:
4547
patterns:
4648
- '*'
49+
cooldown:
50+
default-days: 7
4751
- package-ecosystem: npm
4852
directory: /
4953
schedule:
@@ -82,3 +86,5 @@ updates:
8286
dependency-type: production
8387
dev-dependencies:
8488
dependency-type: development
89+
cooldown:
90+
default-days: 7

.github/workflows/ci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ env:
2727
PYTHONDONTWRITEBYTECODE: 1
2828
FORCE_COLOR: 1 # colored output by pytest etc.
2929

30+
permissions: {}
31+
3032
jobs:
3133

3234
build-wheel:
3335
name: Build python wheel
3436
runs-on: ubuntu-24.04
3537
steps:
3638
- uses: actions/checkout@v5
39+
with:
40+
persist-credentials: false
3741
# update the version
3842
- name: Get short commit SHA
3943
run: |
@@ -48,10 +52,14 @@ jobs:
4852
run: echo "current_version=$(grep -Po '(?<=__version__ = ")[\d\w.]+(?=")' rdmo/__init__.py)" >> $GITHUB_OUTPUT
4953
- name: Generate new version (current version + SHA)
5054
id: new-version
51-
run: echo "new_version=${{ steps.current-version.outputs.current_version }}+$SHA" >> $GITHUB_OUTPUT
55+
run: echo "new_version=${CURRENT_VERSION}+$SHA" >> $GITHUB_OUTPUT
56+
env:
57+
CURRENT_VERSION: ${{ steps.current-version.outputs.current_version }}
5258
- name: Update version in rdmo/__init__.py
5359
run: |
54-
sed -i "s/__version__ = .*/__version__ = \"${{ steps.new-version.outputs.new_version }}\"/" rdmo/__init__.py
60+
sed -i "s/__version__ = .*/__version__ = \"${NEW_VERSION}\"/" rdmo/__init__.py
61+
env:
62+
NEW_VERSION: ${{ steps.new-version.outputs.new_version }}
5563
# build the webpack bundle
5664
- uses: actions/setup-node@v6
5765
with:
@@ -71,6 +79,8 @@ jobs:
7179
db-backend: [mysql, postgres]
7280
steps:
7381
- uses: actions/checkout@v5
82+
with:
83+
persist-credentials: false
7484
- name: Set up Python ${{ matrix.python-version }}
7585
uses: actions/setup-python@v6
7686
with:
@@ -129,6 +139,8 @@ jobs:
129139
db-backend: [postgres]
130140
steps:
131141
- uses: actions/checkout@v5
142+
with:
143+
persist-credentials: false
132144
- name: Set up Python ${{ matrix.python-version }}
133145
uses: actions/setup-python@v6
134146
with:
@@ -189,6 +201,8 @@ jobs:
189201
os: [ubuntu-latest, windows-latest, macos-latest]
190202
steps:
191203
- uses: actions/checkout@v5
204+
with:
205+
persist-credentials: false
192206
- uses: actions/setup-python@v6
193207
with:
194208
python-version: "3.13"
@@ -202,6 +216,8 @@ jobs:
202216
runs-on: ubuntu-24.04
203217
steps:
204218
- uses: actions/checkout@v5
219+
with:
220+
persist-credentials: false
205221
- uses: actions/setup-python@v6
206222
with:
207223
python-version: "3.13"
@@ -260,6 +276,6 @@ jobs:
260276
- dependencies
261277
runs-on: ubuntu-24.04
262278
steps:
263-
- uses: re-actors/alls-green@release/v1
279+
- uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
264280
with:
265281
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ repos:
4949
testing/.*.json|
5050
testing/.*.xml
5151
)$
52+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
53+
rev: v1.16.3
54+
hooks:
55+
- id: zizmor
56+
args: [--fix, --offline]
5257
ci:
5358
autoupdate_schedule: monthly
5459
autofix_prs: false

0 commit comments

Comments
 (0)