Skip to content

Commit ab218f3

Browse files
Adds zizmor sarif (#1214)
Co-authored-by: Ran Benita <ran@unusedvar.com>
1 parent f7f1ee9 commit ab218f3

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
timeout-minutes: 15
2626
permissions:
2727
contents: read
28+
security-events: write
2829
env:
2930
TOXENV: ${{ matrix.name }}
3031
steps:
@@ -57,6 +58,13 @@ jobs:
5758
- name: Run tox
5859
run: tox
5960

61+
- name: Upload zizmor SARIF report into the GitHub repo code scanning
62+
if: contains(matrix.name, 'linting')
63+
uses: github/codeql-action/upload-sarif@v3
64+
with:
65+
sarif_file: zizmor.sarif
66+
category: zizmor
67+
6068
- name: Report coverage
6169
if: contains(matrix.name, 'coverage')
6270
uses: codecov/codecov-action@v5

.github/zizmor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ rules:
44
policies:
55
actions/*: ref-pin
66
codecov/codecov-action: ref-pin
7+
github/*: ref-pin

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ _build
1818
*.egg
1919
# autogenerated by setuptools-scm
2020
/pytest_django/_version.py
21+
zizmor.sarif

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ commands =
4848
ruff check --diff {posargs:pytest_django pytest_django_test tests}
4949
ruff format --quiet --diff {posargs:pytest_django pytest_django_test tests}
5050
mypy {posargs:pytest_django pytest_django_test tests}
51-
zizmor --persona=pedantic .github/workflows/deploy.yml .github/workflows/main.yml
51+
python -c "import subprocess, sys; sys.exit(subprocess.call('zizmor --persona=pedantic --format sarif .github/workflows/deploy.yml .github/workflows/main.yml > zizmor.sarif', shell=True))"
5252

5353
[testenv:doc8]
5454
basepython = python3

0 commit comments

Comments
 (0)