Skip to content

Commit be60150

Browse files
opentelemetrybototelbot[bot]Kielekrajkumar-rangaraj
authored
[infra] Add minimum token permissions for all github workflow files (#6357)
Co-authored-by: otelbot <[email protected]> Co-authored-by: Piotr Kiełkowicz <[email protected]> Co-authored-by: Rajkumar Rangaraj <[email protected]>
1 parent 7f111ea commit be60150

File tree

7 files changed

+23
-2
lines changed

7 files changed

+23
-2
lines changed

.github/workflows/Component.BuildTest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ on:
2828
required: false
2929
type: string
3030

31+
permissions:
32+
contents: read
33+
3134
jobs:
3235
build-test:
3336

.github/workflows/add-labels.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ on:
77
branches: [ 'main*' ]
88

99
permissions:
10-
issues: write
11-
pull-requests: write
10+
contents: read
1211

1312
jobs:
1413
add-labels-on-issues:
14+
permissions:
15+
issues: write
1516
if: github.event_name == 'issues' && !github.event.issue.pull_request
1617

1718
runs-on: ubuntu-22.04
@@ -33,6 +34,8 @@ jobs:
3334
ISSUE_BODY: ${{ github.event.issue.body }}
3435

3536
add-labels-on-pull-requests:
37+
permissions:
38+
pull-requests: write
3639
if: github.event_name == 'pull_request_target'
3740

3841
runs-on: ubuntu-22.04

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches: [ 'main*' ]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
lint-misspell-sanitycheck:
1417
uses: ./.github/workflows/sanitycheck.yml

.github/workflows/markdownlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name: Lint - Markdown
55
on:
66
workflow_call:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
run-markdownlint:
1013
runs-on: ubuntu-22.04

.github/workflows/post-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
types:
1717
- created
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
automation:
2124
uses: ./.github/workflows/automation.yml

.github/workflows/prepare-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
types:
2424
- created
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
automation:
2831
uses: ./.github/workflows/automation.yml

.github/workflows/publish-packages-1.0.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
schedule:
1717
- cron: '0 0 * * *' # once in a day at 00:00
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
automation:
2124
uses: ./.github/workflows/automation.yml

0 commit comments

Comments
 (0)