Skip to content

Commit 3bea98e

Browse files
committed
restrict default GITHUB_TOKEN to read-only in all workflows
1 parent f32fc77 commit 3bea98e

10 files changed

Lines changed: 34 additions & 0 deletions

.github/workflows/docker-nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- cron: '0 1 * * *' # run at 1 AM UTC
1616
workflow_dispatch:
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
build:
2023
if: github.repository == 'eclipse-ditto/ditto'

.github/workflows/gh-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
# Enable manually triggering
2222
workflow_dispatch:
2323

24+
permissions:
25+
contents: read
26+
2427
jobs:
2528
deploy:
2629
runs-on: ubuntu-20.04

.github/workflows/helm-chart-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
required: true
2121
type: string
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
build:
2528
runs-on: ubuntu-latest

.github/workflows/helm-chart.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
- '.github/ct.yml'
2424
- '.github/kubeval.sh'
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
lint-chart:
2831
runs-on: ubuntu-latest

.github/workflows/license-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
# Run build for any PR
1515
pull_request:
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
check-license-header-year:
1922
runs-on: ubuntu-latest

.github/workflows/maven.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ on:
2828
- 'ui/**'
2929
- 'benchmark-tool/**'
3030

31+
permissions:
32+
contents: read
33+
3134
jobs:
3235
build:
3336
runs-on: ubuntu-latest

.github/workflows/push-dockerhub-on-demand.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ on:
3030
- ditto-connectivity
3131
- ditto-ui
3232

33+
permissions:
34+
contents: read
35+
3336
jobs:
3437
build:
3538
runs-on: ubuntu-latest

.github/workflows/push-dockerhub.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
tags:
1616
- '**'
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
build:
2023
runs-on: ubuntu-latest

.github/workflows/system-tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,16 @@ run-name: >-
5454
System Tests • ${{ inputs.ditto_repo }}@${{ inputs.ditto_branch }}
5555
• ${{ inputs.ditto_testing_repo }}@${{ inputs.ditto_testing_branch }}
5656
57+
permissions:
58+
contents: read
59+
5760
jobs:
5861
system-tests:
5962
runs-on: ditto-runner
63+
permissions:
64+
contents: read
65+
# required by dorny/test-reporter to publish results to the GitHub Checks API
66+
checks: write
6067
env:
6168
DITTO_BRANCH: ${{ github.event.inputs.ditto_branch }}
6269
DITTO_REPO: ${{ github.event.inputs.ditto_repo }}

.github/workflows/ui-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
paths:
2222
- 'ui/**'
2323

24+
permissions:
25+
contents: read
26+
2427
jobs:
2528
build:
2629
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)