Skip to content

Commit a093fb0

Browse files
committed
Address zizmor workflow warnings
1 parent f287dea commit a093fb0

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.github/workflows/cla.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: "CLA Assistant"
22

3+
# NOTE: This workflow runs against PR *target* branches, not against the source branches.
4+
# This ensures modified code cannot be executed with the workflow's permissions.
5+
# It's still easier to misuse than most potential triggers, hence the zizmor warning.
6+
37
on:
48
issue_comment:
59
types: [created]
6-
pull_request_target:
10+
pull_request_target: # zizmor: ignore[dangerous-triggers]
711
types: [opened, closed, synchronize, labeled] # Added "labeled" event to check for label changes
812
workflow_dispatch: # Allow manual triggering of the workflow
913

1014
permissions:
1115
actions: write
12-
contents: write
16+
contents: read # Signatures are stored in a dedicated repository
1317
pull-requests: write
1418
statuses: write
1519
checks: write

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
release:
55
types: [published]
66

7+
# Require explicit job permissions
8+
permissions: {}
79

810
jobs:
911
pypi-publish:

.github/workflows/scan-workflows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches:
1212
- main
1313

14+
# Require explicit job permissions
15+
permissions: {}
16+
1417
jobs:
1518
zizmor:
1619
name: zizmor latest via PyPI

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ on:
2424
branches:
2525
- main
2626

27+
# Require explicit job permissions
28+
permissions: {}
29+
2730
defaults:
2831
run:
2932
# Use the Git for Windows bash shell, rather than supporting Powershell

0 commit comments

Comments
 (0)