Skip to content

Commit 2bed0c4

Browse files
Merge pull request #197 from maxfischer2781/maintenance/20260402-zizmor
Maintenance for GitHub Actions (20260402)
2 parents 0c5e206 + 0393fe6 commit 2bed0c4

6 files changed

Lines changed: 66 additions & 27 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ updates:
66
interval: "weekly"
77
reviewers:
88
- "maxfischer2781"
9+
cooldown:
10+
default-days: 7

.github/workflows/codeql.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
schedule:
99
- cron: "4 9 * * 4"
1010

11+
permissions: {}
12+
1113
jobs:
1214
analyze:
1315
name: Analyze
@@ -24,18 +26,17 @@ jobs:
2426

2527
steps:
2628
- name: Checkout
27-
uses: actions/checkout@v6
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
30+
with:
31+
persist-credentials: false
2832

2933
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v4
34+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13
3135
with:
3236
languages: ${{ matrix.language }}
3337
queries: +security-and-quality
3438

35-
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v4
37-
3839
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v4
40+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13
4041
with:
4142
category: "/language:${{ matrix.language }}"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
runs-on: ubuntu-latest
14+
permissions:
15+
security-events: write
16+
contents: read # only needed for private or internal repos
17+
actions: read # only needed for private or internal repos
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
persist-credentials: false
23+
24+
- name: Run zizmor 🌈
25+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
26+
with:
27+
inputs: |
28+
.github
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Upload Python Package
2+
permissions: {}
103

114
on:
125
release:
@@ -16,11 +9,19 @@ jobs:
169
deploy:
1710

1811
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
# IMPORTANT: this permission is mandatory for Trusted Publishing
15+
id-token: write
16+
environment:
17+
name: pypi-publish
1918

2019
steps:
21-
- uses: actions/checkout@v6
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
21+
with:
22+
persist-credentials: false
2223
- name: Set up Python
23-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2425
with:
2526
python-version: '3.x'
2627
- name: Install dependencies
@@ -31,6 +32,3 @@ jobs:
3132
run: python -m build
3233
- name: Publish package
3334
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
34-
with:
35-
user: __token__
36-
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/unittests.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Unit Tests
2+
permissions: {}
23

34
on:
45
push:
@@ -7,8 +8,10 @@ on:
78
- cron: '0 10 * * 3,6'
89

910
jobs:
10-
build:
11+
pytest:
1112
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1215
strategy:
1316
matrix:
1417
python-version: [
@@ -17,9 +20,11 @@ jobs:
1720
]
1821

1922
steps:
20-
- uses: actions/checkout@v6
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
24+
with:
25+
persist-credentials: false
2126
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v6
27+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
2328
with:
2429
python-version: ${{ matrix.python-version }}
2530
allow-prereleases: true
@@ -31,4 +36,4 @@ jobs:
3136
run: |
3237
pytest --durations=0 --cov=./
3338
- name: Upload coverage to Codecov
34-
uses: codecov/codecov-action@v5
39+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2

.github/workflows/verification.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Static Checks
2+
permissions: {}
23

34
on:
45
push:
@@ -7,12 +8,16 @@ on:
78
- cron: '0 10 * * 3,6'
89

910
jobs:
10-
build:
11+
verify:
1112
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1215
steps:
13-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
17+
with:
18+
persist-credentials: false
1419
- name: Set up Python
15-
uses: actions/setup-python@v6
20+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
1621
with:
1722
python-version: '3.x'
1823
- name: Install dependencies
@@ -29,4 +34,4 @@ jobs:
2934
run: |
3035
mypy --pretty
3136
- name: Verify with PyRight
32-
uses: jakebailey/pyright-action@v3
37+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef

0 commit comments

Comments
 (0)