Skip to content

Commit da51adc

Browse files
authored
Set least privileged token permission for GitHub Actions (fatedier#3155)
Signed-off-by: Ashish Kurmi <[email protected]>
1 parent e5af37b commit da51adc

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Diff for: .github/workflows/build-and-push-image.yml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
description: 'Image tag'
1010
required: true
1111
default: 'test'
12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
image:
1417
name: Build Image from Dockerfile and binaries

Diff for: .github/workflows/goreleaser.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: goreleaser
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
goreleaser:
811
runs-on: ubuntu-latest

Diff for: .github/workflows/stale.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ on:
88
description: 'In debug mod'
99
required: false
1010
default: 'false'
11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
stale:
16+
permissions:
17+
issues: write # for actions/stale to close stale issues
18+
pull-requests: write # for actions/stale to close stale PRs
1319
runs-on: ubuntu-latest
1420
steps:
1521
- uses: actions/stale@v6

0 commit comments

Comments
 (0)