Skip to content

Commit 329c532

Browse files
committed
Add zizmor to CI
Although the actions are pretty simple, it probably can't hurt to fix them up using better knowledge than mine. Fixes #249
1 parent ca65e02 commit 329c532

File tree

4 files changed

+43
-3
lines changed

4 files changed

+43
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
with:
1414
submodules: true
1515
fetch-depth: 0
16+
persist-credentials: false
1617
- name: ruff check
1718
uses: chartboost/ruff-action@v1
1819
- name: ruff format
@@ -46,6 +47,7 @@ jobs:
4647
uses: actions/checkout@v4
4748
with:
4849
submodules: true
50+
persist-credentials: false
4951
- name: Set up Python
5052
uses: actions/setup-python@v5
5153
with:
@@ -104,6 +106,7 @@ jobs:
104106
with:
105107
submodules: true
106108
fetch-depth: 0
109+
persist-credentials: false
107110
- name: Set up Python ${{ matrix.python-version }}
108111
uses: actions/setup-python@v5
109112
with:

.github/workflows/release-builtins.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ jobs:
2525
with:
2626
submodules: true
2727
fetch-depth: 0
28+
persist-credentials: false
2829
- name: update core
30+
env:
31+
TAG: ${{ inputs.tag || 'master '}}
2932
# needs to detach because we can update to a tag
30-
run: git -C uap-core switch --detach ${{ inputs.tag || 'master' }}
33+
run: git -C uap-core switch --detach "$TAG"
3134
- name: Set up Python
3235
uses: actions/setup-python@v5
3336
with:

.github/workflows/release-main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
steps:
2323
- name: Checkout working copy
2424
uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
2527
- name: Set up Python
2628
uses: actions/setup-python@v5
2729
with:
@@ -34,15 +36,15 @@ jobs:
3436
run: python -mbuild
3537
- name: Publish to testpypi
3638
if: ${{ env.ENVNAME == 'testpypi' }}
37-
uses: pypa/gh-action-pypi-publish@release/v1
39+
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
3840
with:
3941
repository-url: https://test.pypi.org/legacy/
4042
skip-existing: true
4143
verbose: true
4244
password: ${{ secrets.PUBLISH_TOKEN }}
4345
- name: Publish to pypi
4446
if: ${{ env.ENVNAME == 'pypi' }}
45-
uses: pypa/gh-action-pypi-publish@release/v1
47+
uses: pypa/gh-action-pypi-publish@release/v1 # zizmor: ignore[use-trusted-publishing]
4648
with:
4749
verbose: true
4850
password: ${{ secrets.PUBLISH_TOKEN }}

.github/workflows/zizmor.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
zizmor:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
security-events: write
12+
contents: read
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
20+
- name: Install the latest version of uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: Run zizmor
24+
run: uvx zizmor --format sarif . > results.sarif
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Upload SARIF file
29+
uses: github/codeql-action/upload-sarif@v3
30+
with:
31+
sarif_file: results.sarif
32+
category: zizmor

0 commit comments

Comments
 (0)