Skip to content

Commit a7c332a

Browse files
tashianclaude
andcommitted
Add explicit permissions blocks, remove excessive-permissions ignores
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 14e5181 commit a7c332a

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1717
cancel-in-progress: true
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
ci:
2124
uses: smallstep/workflows/.github/workflows/goCI.yml@main

.github/workflows/code-scan-cron.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ on:
22
schedule:
33
- cron: '0 0 * * *'
44

5+
permissions:
6+
actions: read
7+
contents: read
8+
security-events: write
9+
510
jobs:
611
code-scan:
712
uses: smallstep/workflows/.github/workflows/code-scan.yml@main

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ on:
66
tags:
77
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
ci:
14+
permissions:
15+
contents: read
1116
uses: smallstep/certificates/.github/workflows/ci.yml@master
1217
secrets: inherit
1318

1419
create_release:
1520
name: Create Release
21+
permissions:
22+
contents: write
1623
needs: ci
1724
runs-on: ubuntu-latest
1825
env:

.github/zizmor.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ rules:
2929
- release.yml:91
3030
- triage.yml:19
3131
- zizmor.yml:15
32-
# These workflows either lack a top-level `permissions:` block
33-
# (using GitHub defaults) or delegate to reusable workflows that
34-
# declare their own minimal permissions internally.
35-
excessive-permissions:
36-
ignore:
37-
- ci.yml:20
38-
- code-scan-cron.yml:6
39-
- release.yml:1
40-
- release.yml:10
41-
- release.yml:14
4232
# The triage workflow uses `pull_request_target` to label PRs
4333
# from forks. This is safe because the called reusable workflow
4434
# does not checkout or execute code from the PR.

0 commit comments

Comments
 (0)