Skip to content

Commit c08133e

Browse files
ci: scope down GitHub Token permissions (#344)
* ci: scope down permissions for stale_issues.yml * ci: scope down permissions for closed-issue-message.yml * ci: scope down permissions for change-file-in-pr.yml --------- Co-authored-by: Adnan Khan <[email protected]>
1 parent 1cebeaf commit c08133e

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/change-file-in-pr.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, synchronize, reopened, labeled]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
check-files-in-directory:
912
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Release Not Needed') && !contains(github.event.pull_request.labels.*.name, 'Release PR') }}

.github/workflows/closed-issue-message.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Closed Issue Message
22
on:
33
issues:
44
types: [closed]
5+
permissions:
6+
issues: write
7+
58
jobs:
69
auto_comment:
710
runs-on: ubuntu-latest

.github/workflows/stale_issues.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: "0 0 * * *"
77

8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
812
jobs:
913
cleanup:
1014
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)