Skip to content

Commit 99dcff2

Browse files
committed
chore(gh): update workflow permissions
Explicitly defines the permissions granted to the `GITHUB_TOKEN` used within the workflows. By default, the `GITHUB_TOKEN` has broad write access. Limiting these permissions to only what the workflow actually needs. Signed-off-by: Ryan Johnson <[email protected]>
1 parent dd1310a commit 99dcff2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Diff for: .github/workflows/stale.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
---
2-
name: Manage Stale Items
1+
name: Stale
32

43
on:
54
schedule:
65
- cron: 00 00 * * *
76

7+
permissions:
8+
contents: read
9+
issues: write
10+
pull-requests: write
11+
812
jobs:
913
stale:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
issues: write
13-
pull-requests: write
1415
steps:
1516
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
1617
with:

Diff for: .github/workflows/test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: golang-test
1+
name: Test
22

33
on:
44
pull_request:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
gotest:
811
name: gotest

0 commit comments

Comments
 (0)