Skip to content

Commit e3f032e

Browse files
committed
add zizmor scanning to workflows
1 parent a66b1f4 commit e3f032e

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/zizmor.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
# Run weekly
10+
- cron: '0 0 * * 0'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
zizmor-analysis:
18+
name: Run Zizmor
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
security-events: write
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
29+
30+
- name: Set up Rust
31+
uses: actions-rust-lang/setup-rust-toolchain@v1
32+
33+
- name: Install Zizmor
34+
run: |
35+
cargo install zizmor
36+
37+
- name: Run Zizmor analysis
38+
run: |
39+
zizmor --format sarif .github/workflows/ > results.sarif
40+
41+
- name: Upload analysis results
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: zizmor-results
45+
path: results.sarif
46+
retention-days: 7
47+
48+
- name: Upload to code-scanning
49+
uses: github/codeql-action/upload-sarif@v3
50+
with:
51+
sarif_file: results.sarif

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Security Policy
22

33
[![CodeQL](https://github.com/bckohan/django-enum/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/bckohan/django-enum/actions/workflows/github-code-scanning/codeql?query=branch:main)
4+
[![Zizmor](https://github.com/bckohan/django-enum/actions/workflows/zizmor.yml/badge.svg?branch=main)](https://woodruffw.github.io/zizmor)
45
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/bckohan/django-enum/badge)](https://securityscorecards.dev/viewer/?uri=github.com/bckohan/django-enum)
56

67
## Supported Versions

0 commit comments

Comments
 (0)