Skip to content

Commit 47ff7dc

Browse files
dguidoclaude
andcommitted
Restrict GitHub Actions workflow permissions
Add explicit minimal permissions to all workflows to follow security best practices (fixes zizmor excessive-permissions audit). Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent d332669 commit 47ff7dc

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches: [main, dev]
99
paths: ["**/*.py"]
1010

11+
permissions:
12+
contents: read
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.ref }}
1316
cancel-in-progress: true

.github/workflows/pip-audit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [dev, main]
88

9+
permissions:
10+
contents: read
11+
912
concurrency:
1013
group: ${{ github.workflow }}-${{ github.ref }}
1114
cancel-in-progress: true

.github/workflows/publish.yaml

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

7+
permissions: {}
8+
79
jobs:
810
build-release:
11+
permissions:
12+
contents: read
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
1013
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)