Skip to content

Commit bef122e

Browse files
authored
[chore] add top level permissions (#38869)
Many of our github workflows dont have top level permissions, adding them as they were added in core as well. Signed-off-by: Alex Boten <[email protected]>
1 parent b06f38b commit bef122e

5 files changed

+11
-0
lines changed

.github/workflows/build-and-test-arm.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ env:
1212
# We limit cache download as a whole to 5 minutes.
1313
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
1414

15+
permissions: read-all
16+
1517
# Do not cancel this workflow on main. See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/16616
1618
concurrency:
1719
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.github/workflows/build-and-test-darwin.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ concurrency:
2020
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2121
cancel-in-progress: true
2222

23+
permissions: read-all
24+
2325
jobs:
2426
darwin-build-unittest-binary:
2527
if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Darwin') || github.event_name == 'push' || github.event_name == 'merge_group') }}

.github/workflows/build-and-test-windows.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ concurrency:
2222
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2323
cancel-in-progress: true
2424

25+
permissions: read-all
26+
2527
jobs:
2628
windows-unittest-matrix:
2729
strategy:

.github/workflows/build-and-test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- "v[0-9]+.[0-9]+.[0-9]+*"
77
merge_group:
88
pull_request:
9+
10+
permissions: read-all
11+
912
env:
1013
TEST_RESULTS: testbed/tests/results/junit/results.xml
1114
# Make sure to exit early if cache segment download times out after 2 minutes.

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
paths-ignore:
77
- "**/README.md"
88

9+
permissions: read-all
10+
911
jobs:
1012
CodeQL-Build:
1113
runs-on: macos-latest

0 commit comments

Comments
 (0)