Skip to content

Commit bffffed

Browse files
committed
chore(ci): tighten workflow token permissions
1 parent 7085ece commit bffffed

5 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ on:
99
types:
1010
- released
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
generate-and-deploy:
1417
name: Generate and deploy
1518
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
1621
steps:
1722
- name: Checkout head
1823
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/examples.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ concurrency:
1313
group: ${{ github.repository }}-${{ github.workflow }}
1414
cancel-in-progress: false
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
test:
1821
name: Test

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- 'go.mod'
77
- 'go.sum'
88
- '.github/workflows/lint.yml'
9+
permissions:
10+
contents: read
911
jobs:
1012
golangci-lint:
1113
name: golangci-lint

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
push:
44
tags:
55
- 'v*.*.*'
6+
permissions:
7+
contents: read
68
jobs:
79
publish_release:
810
name: Release

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- '**.go'
66
- 'go.mod'
77
- 'go.sum'
8+
permissions:
9+
contents: read
810
jobs:
911
unit-tests:
1012
name: Run unit-tests

0 commit comments

Comments
 (0)