Skip to content

Commit b2f55de

Browse files
committed
ci: add least-privilege permissions to all workflows
1 parent fc0e253 commit b2f55de

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

.github/workflows/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
test:
1316
runs-on: ubuntu-latest

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
env:
1215
# Tag for cache invalidation
1316
CACHE_VERSION: v10

.github/workflows/docker.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ on:
77
tags:
88
- '*'
99

10+
permissions: {}
11+
1012
jobs:
1113
build:
1214
name: build ${{ matrix.platform }} container
1315
runs-on: ${{ matrix.os }}
16+
permissions:
17+
contents: read
18+
packages: write
1419
strategy:
1520
fail-fast: false
1621
matrix:
@@ -97,6 +102,9 @@ jobs:
97102
merge:
98103
name: merge containers
99104
runs-on: ubuntu-latest
105+
permissions:
106+
contents: read
107+
packages: write
100108
needs:
101109
- build
102110
steps:

.github/workflows/hlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
hlint:
1316
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
branches:
1010
- master
1111

12+
permissions: {}
13+
1214
jobs:
1315
nixBuild:
1416
name: Build ${{ matrix.name }} binary

0 commit comments

Comments
 (0)