Skip to content

Commit 4a5bf1b

Browse files
committed
Add explicit read-only permissions to CI workflows
1 parent 118f2a3 commit 4a5bf1b

15 files changed

Lines changed: 46 additions & 3 deletions

.github/workflows/build_runner_image.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on:
2929
env:
3030
docker_registry: us-central1-docker.pkg.dev
3131
docker_repo: apache-beam-testing/beam-github-actions/beam-arc-runner
32+
33+
permissions:
34+
contents: read
35+
3236
jobs:
3337
build-and-version-runner:
3438
if: github.repository == 'apache/beam'

.github/workflows/code_completion_plugin_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ env:
4040
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
4141
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
4242
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
43+
permissions:
44+
contents: read
45+
4346
jobs:
4447
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
4548
# Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks

.github/workflows/dask_runner_tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ concurrency:
3333
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login}}'
3434
cancel-in-progress: true
3535

36+
permissions:
37+
contents: read
38+
3639
jobs:
3740

3841
build_python_sdk_source:
@@ -93,4 +96,3 @@ jobs:
9396
with:
9497
name: pytest-${{matrix.os}}-${{matrix.params.py_ver}}
9598
path: sdks/python/pytest**.xml
96-

.github/workflows/go_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ on:
3434
concurrency:
3535
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login}}'
3636
cancel-in-progress: true
37+
permissions:
38+
contents: read
39+
3740
jobs:
3841
build:
3942
runs-on: [self-hosted, ubuntu-24.04, main]

.github/workflows/java_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ env:
3838
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3939
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
4040
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
41+
permissions:
42+
contents: read
43+
4144
jobs:
4245
java_unit_tests:
4346
name: 'Java Unit Tests'

.github/workflows/local_env_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ env:
3939
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
4040
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
4141

42+
permissions:
43+
contents: read
44+
4245
jobs:
4346
run_local_env_install_ubuntu:
4447
timeout-minutes: 25

.github/workflows/playground_frontend_test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ env:
3636
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
3737
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
3838

39+
permissions:
40+
contents: read
41+
3942
jobs:
4043
playground_frontend_test:
4144
name: Playground Frontend Test

.github/workflows/python_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ concurrency:
3636
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login}}'
3737
cancel-in-progress: true
3838

39+
permissions:
40+
contents: read
41+
3942
jobs:
4043

4144
check_gcp_variables:

.github/workflows/refresh_looker_metrics.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ env:
2727
LOOKERSDK_CLIENT_SECRET: ${{ secrets.LOOKERSDK_CLIENT_SECRET }}
2828
GCS_BUCKET: 'public_looker_explores_us_a3853f40'
2929

30+
permissions:
31+
contents: read
32+
3033
jobs:
3134
refresh_looker_metrics:
3235
runs-on: [self-hosted, ubuntu-24.04, main]

.github/workflows/reportGenerator.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
- cron: "0 10 * * 2"
2222
workflow_dispatch:
2323

24+
permissions:
25+
contents: read
26+
2427
jobs:
2528
assign:
2629
name: Generate issue report

0 commit comments

Comments
 (0)