Skip to content

Commit fd2ab21

Browse files
committed
Add zizmor & fix findings
1 parent baa0144 commit fd2ab21

5 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/check-pr-template.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
types: [opened, edited, reopened, synchronize]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
check-pr-template:
912
name: Check PR template

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ concurrency:
1111
group: ${{ github.ref }}
1212
cancel-in-progress: true
1313

14+
permissions:
15+
contents: read
16+
1417
defaults:
1518
run:
1619
shell: bash

.github/workflows/new-issue.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ jobs:
1111
add-to-project:
1212
name: Add issue to BeeWare project
1313
runs-on: ubuntu-latest
14+
# The add-to-project action authenticates with BRUTUS_PAT_TOKEN, so the
15+
# job's own GITHUB_TOKEN needs no permissions.
16+
permissions: {}
1417
steps:
15-
- uses: actions/add-to-project@v2.0.0
18+
- uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
1619
with:
1720
project-url: https://github.com/orgs/beeware/projects/1
1821
github-token: ${{ secrets.BRUTUS_PAT_TOKEN }}

.github/zizmor.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
rules:
2+
unpinned-uses:
3+
config:
4+
# Allow BeeWare-provided actions to be unpinned. If an attacker is in a
5+
# position to exploit those action, they're probably able to exploit
6+
# repositories directly; and it's significantly easier for our internal
7+
# actions to automatically be the most recent versions.
8+
policies:
9+
beeware/*: ref-pin

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ repos:
88
- id: check-case-conflict
99
- id: end-of-file-fixer
1010
- id: trailing-whitespace
11+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
12+
rev: v1.26.1
13+
hooks:
14+
- id: zizmor

0 commit comments

Comments
 (0)