Skip to content

Commit 464cc62

Browse files
authored
Update token permissions in workflows. See #5945 (#5946)
1 parent e24881d commit 464cc62

File tree

8 files changed

+61
-0
lines changed

8 files changed

+61
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
paths:
1111
- "quickwit/**"
1212
- "!quickwit/quickwit-ui/**"
13+
14+
permissions:
15+
contents: read
16+
1317
env:
1418
CARGO_INCREMENTAL: 0
1519
QW_DISABLE_TELEMETRY: 1
@@ -28,6 +32,9 @@ jobs:
2832
name: Unit tests
2933
runs-on: "ubuntu-latest"
3034
timeout-minutes: 40
35+
permissions:
36+
contents: read
37+
actions: write
3138
services:
3239
# PostgreSQL service container
3340
postgres:
@@ -98,6 +105,9 @@ jobs:
98105
name: Lints
99106
runs-on: "ubuntu-latest"
100107
timeout-minutes: 20
108+
permissions:
109+
contents: read
110+
actions: write
101111
steps:
102112
- uses: actions/checkout@v5
103113
- uses: dorny/paths-filter@v3
@@ -157,6 +167,9 @@ jobs:
157167
thirdparty-license:
158168
name: Check Datadog third-party license file
159169
runs-on: ubuntu-latest
170+
permissions:
171+
contents: read
172+
actions: write
160173
steps:
161174
- uses: actions/checkout@v5
162175
- name: Install Rust toolchain

.github/workflows/coverage.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- quickwit/Cargo.lock
1212
- quickwit/quickwit-*/**
1313

14+
permissions:
15+
contents: read
16+
1417
env:
1518
AWS_REGION: us-east-1
1619
AWS_ACCESS_KEY_ID: "placeholder"
@@ -28,6 +31,9 @@ jobs:
2831
name: Coverage
2932
runs-on: gh-ubuntu-arm64
3033
timeout-minutes: 40
34+
permissions:
35+
contents: read
36+
actions: write
3137
# Setting a containing will require to fix the QW_S3_ENDPOINT to http://localstack:4566
3238
services:
3339
localstack:

.github/workflows/publish_cross_images.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
paths:
99
- "build/cross-images/**"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build-cross-images:
1316
name: Publish cross images

.github/workflows/publish_docker_images.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- happy-plazza
1313
- qw*
1414
- v*
15+
16+
permissions:
17+
contents: read
18+
1519
env:
1620
REGISTRY_IMAGE: quickwit/quickwit
1721

@@ -27,6 +31,9 @@ jobs:
2731
platform: linux/arm64
2832
platform_suffix: arm64
2933
runs-on: ${{ matrix.os }}
34+
permissions:
35+
contents: read
36+
actions: write
3037
environment:
3138
name: production
3239
steps:
@@ -99,6 +106,9 @@ jobs:
99106
merge:
100107
runs-on: ubuntu-latest
101108
needs: [docker]
109+
permissions:
110+
contents: read
111+
actions: read
102112
environment: production
103113
steps:
104114
- name: Download digests

.github/workflows/publish_lambda_packages.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ on:
55
tags:
66
- "aws-lambda-beta-*"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-lambdas:
1013
name: Build Quickwit Lambdas
1114
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
1217
steps:
1318
- uses: actions/checkout@v5
1419
- name: Install Ubuntu packages

.github/workflows/publish_nightly_packages.yml

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

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-macos-binaries:
1013
name: Build ${{ matrix.target }}
1114
runs-on: macos-latest
15+
permissions:
16+
contents: write
17+
actions: write
1218
strategy:
1319
fail-fast: false
1420
matrix:
@@ -27,6 +33,9 @@ jobs:
2733
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
2834
name: Build ${{ matrix.target }}
2935
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write
38+
actions: write
3039
steps:
3140
- uses: actions/checkout@v5
3241
- uses: ./.github/actions/cross-build-binary

.github/workflows/publish_release_packages.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build-macos-binaries:
1013
name: Build ${{ matrix.target }}
1114
runs-on: macos-latest
15+
permissions:
16+
contents: write
17+
actions: write
1218
strategy:
1319
matrix:
1420
target: [x86_64-apple-darwin, aarch64-apple-darwin]
@@ -29,6 +35,9 @@ jobs:
2935
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
3036
name: Build ${{ matrix.target }}
3137
runs-on: ubuntu-latest
38+
permissions:
39+
contents: write
40+
actions: write
3241
steps:
3342
- uses: actions/checkout@v5
3443
- name: Extract asset version

.github/workflows/ui-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ on:
1414
- "quickwit/quickwit-ui/**"
1515
- ".github/workflows/ui-ci.yml"
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
tests:
1922
name: ${{ matrix.task.name }}
2023
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
actions: write
2127
strategy:
2228
fail-fast: false
2329
matrix:

0 commit comments

Comments
 (0)